title: How to load table dynamically on the checkbox value in gsp
body: <p>I am working on a table in gsp which i want to load dynamically on a checkbox value.. I need if the checkbox is unchecked than the table will show the following fields </p>
  
  <pre><code>Name  age country status
  Tom   35  USA     Confirm
  Nick  30  USA     ready
  Alex  25  Canada  Inprogress
  Johny 20  UK      Waiting
  </code></pre>
  
  <p>and if the checkbox is checked it will show all the fields</p>
  
  <pre><code>Name  age country status
  Tom   35  USA     Confirm
  Nick  30  USA     ready
  Alex  25  Canada  Inprogress
  Johny 20  UK      Waiting
  Dipu  22  USA
  Jack  22  UK
  </code></pre>
  
  <p>I am using the following code</p>
  
  <pre><code>   &lt;g:each in="${domainInstanceList}" status="i" var="domainInstance"&gt;
                  &lt;%
  
                       //color = "#ff4d4d"
                       color = "#FF6868"
                     def  name = domainInstance?.name
                     def  age= domainInstance?.age
                      def country= domainInstance?.country
  
                      if (domainInstance.isConfirm) {
                          //color = "#b3ccff"
                          color = "#56B9CC"
                          status = "Confirmed"
                      }
                      if(domainInstance.isReady){
                             status = "Ready"
                      }else if(domainInstance.inProgress ){
                          status = "Inprogress"
                      }else if(domainInstance.iswaiting  ){
                          status = "Waiting"
                      }
  
  
                  %&gt;
  
                  &lt;tr style="background-color:${color}" class="${(i % 2) == 0 ? 'even' : 'odd'}"&gt;
                          &lt;td&gt;&lt;b&gt;&lt;g:link action="show" id="${domainInstance?.id}"&gt;${domainInstance?.prefix}${domainInstance?.number}&lt;/g:link&gt;&lt;/td&gt;&lt;/b&gt;&lt;/td&gt;
  
                          &lt;td&gt;${name}
                          &lt;td&gt;${age}
                          &lt;td&gt;${country}
                          &lt;td&gt;${status}
  
                  &lt;/tr&gt;               
              &lt;/g:each&gt;
  </code></pre>
  
  <p>can i use jquery in it ... how ?
  Please help me<br>
  thanks</p>