title: Checked checkbox remain through pagination using load JavaScript
body: <p>I have a problem here using .load() AJAX/jQuery when I use it in pagination. the status of my checkbox will not remain when I go to another page.</p>
  
  <p>For example I checked 2 items in page 1 then when I go to page 2 to select another item then when I go back to page 1 to test if my checked item remain checked. unfortunately it became unchecked maybe because of the .load(). Is there an alternative to use aside .load() to remain my checkbox checked?</p>
  
  <p>Here is my code for .load() ajax:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  $(document).ready(function() {
      $("#results").load("fetch_pages.php", {'page':0}, function() {$("#1-page").addClass('active');});  //initial page number to load
      $('body').on('click', '.paginate_click', function(e){
      var ticked = [];
      $('.tick:checked').each(function(){
        ticked.push($(this).attr("id"));
      });
  
  
      var clicked_id = $(this).attr("id").split("-"); //ID of clicked element, split() to get page number.
      var page_num = parseInt(clicked_id[0]); 
  
      $('.paginate_click').removeClass('active'); 
      $("#results").load("fetch_pages.php", {'page':(page_num-1)}, function(){
         ticked.forEach(function(val, i){
            $(val).prop('checked', true);
         });
      });
  
      $(this).addClass('active');
      return false;
  });     
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>and here is my checkbox code</p>
  
  <pre><code>echo "&lt;div id='a'&gt;&lt;input type='checkbox' class='tick' name='items[$i]' id='$i' value='". $item['ItemID'] ."' &gt;".$item['ItemName']."&lt;/div&gt;";
  </code></pre>
  
  <p>What's the problem here? </p>