title: How to store multi-selected row with color highlighted in javascript model table?
body: <p>I am facing Issue related background colour change on submit(table row) need to be there(store) when i
  go by modal (like pagination concept it's one page have some limited number of record) next and previous button, but code written like that it's every time refresh the page  when i submit next and previous button . How I can Solve this ??</p>
  
  <p>and 2nd when I select row it data come in list before submit when i remove row it not remove the colour from that table row, please help me any suggestion is welcome ??? below is my code ..</p>
  
  <p><strong>Code</strong></p>
  
  <pre><code>function popRoleNext(){
    $("#roleAddTable &gt; tr").remove();
    current=current+incremVal;
    popRole();
   }
   function popRolePrev(){
   $("#roleAddTable &gt; tr").remove();  
  current=current-incremVal;
    popRole();
   }
  </code></pre>
  
  <p><strong>Html Part Of Table</strong></p>
  
  <pre><code> &lt;table class="table table-striped table-bordered" id="roleAddTableMain"&gt;
         &lt;thead&gt;
           &lt;tr&gt;
             &lt;!-- &lt;th class="col-sm-5"&gt;Role Id&lt;/th&gt; --&gt;
             &lt;th class="col-sm-6"&gt;Role Description&lt;/th&gt;              
           &lt;/tr&gt;
         &lt;/thead&gt;
         &lt;tbody id="roleAddTable"&gt;
  
         &lt;/tbody&gt;
      &lt;/table&gt;
           &lt;/div&gt;
  </code></pre>
  
  <p><strong>Script part of table to retrieve data</strong></p>
  
  <pre><code>function popRole(){      
       var roleAddTableValue="";
  
   for(var i=current;i&lt;current+incremVal;i++){ 
       if(i&gt;=arrCount) {//hide next button
          $("#popRoleNextBtn").prop('disabled', true);
       break;
          }else if(arrCount==(current+incremVal)) {
              $("#popRoleNextBtn").prop('disabled', true);
              //break;
          }
          else{
           $("#popRoleNextBtn").prop('disabled', false);
          } 
  
       if(current&lt;=0){
       $("#popRolePrevBtn").prop('disabled', true);
  
       }else{
  
          $("#popRolePrevBtn").prop('disabled', false);
  
       }
       var arrValuesSub = arrValues[i].split(':');
  
       roleAddTableValue = roleAddTableValue+"&lt;tr&gt;";
  
             roleAddTableValue = roleAddTableValue+"&lt;td id='"+arrValuesSub[0]+"' class='modelRoleId'&gt;"+arrValuesSub[1]+"&lt;/td&gt;";
  
                roleAddTableValue = roleAddTableValue+"&lt;/tr&gt;";
    }
   $("#roleAddTable").append(roleAddTableValue);
   }
  </code></pre>