
  <?php $j=$navs/10; for($i=0;$i<=$j;$i++){?>
  <li class="<?php if($i==0){echo 'active';}?> lisclass page-item"><a href="<?php echo $i*10;?>" class="page-link change_page"><?php echo $i+1;?></a></li>
  <?php }?>
  
  
  <script>
  $(document).ready(function(){
	 $.ajax({
			 type: "POST",
			 url: '<?php echo base_url();?>store/ajax_mystore_product',
			 data: {offset:0,mid:'<?php echo $mid;?>',cid:'<?php echo $cid;?>',sid:'<?php echo $sid;?>',brand:'<?php echo $brand;?>',title:'<?php echo $title;?>'},
			 success: function(res){
				$("#list_products").html(res)
			 }
	 });
	 $(".change_page").click(function(e){e.preventDefault();
	 	 $(".lisclass").removeClass("active");
		 $(this).closest("li").addClass("active");
		 var offset=$(this).attr("href");
		 $.ajax({
			 type: "POST",
			 url: '<?php echo base_url();?>store/ajax_mystore_product',
			 data: {offset:offset,mid:'<?php echo $mid;?>',cid:'<?php echo $cid;?>',sid:'<?php echo $sid;?>',brand:'<?php echo $brand;?>',title:'<?php echo $title;?>'},
			 success: function(res){
				$("#list_products").html(res)
			 }
	 	 });
	 });
  });
  </script>
