Php Flow » HTML5, Php

table sorting with help of jquery sorter

table sorting with help of jquery sorter.

  1. <script type=“text/javascript” src=“{$SITEURL}egg_admin/js/jquery-latest.js”></script>  
  2.  <script type=“text/javascript” src=“{$SITEURL}egg_admin/js/jquery.tablesorter.pager.js”></script>  
  3.    
  4.  <script type=“text/javascript” src=“{$SITEURL}egg_admin/js/jquery.tablesorter.js”>  
  5.   
  6.   
  7.   
  8. <script>  
  9.    $(document).ready(function() {  
  10.     // call the tablesorter plugin  
  11.     $(“#myTable”).tablesorter({  
  12.         // sort on the first column and third column, order asc  
  13.         //sortList: [[0,0],[1,0]]  
  14.    headers: {  
  15.             // assign the secound column (we start counting zero)  
  16.             3: {  
  17.                 // disable it by setting the property sorter to false  
  18.                 sorter: false  
  19.             },  
  20.    0: {  
  21.                 // disable it by setting the property sorter to false  
  22.                 sorter: false  
  23.             }  
  24.    }  
  25.     });  
  26.    
  27.    
  28. });  
  29. </script>  
  30.      
  31. <table>  
  32.   
  33. <thead>  
  34.       <tr>  
  35.       <th>test</th><tr></thred><table>  

Did you enjoy this article? Share it!

About the Author:

Hi, This is Parvez Alam from India. I am software developer with 4 years’ experience in web development. I have submitted articles on PHP, Mysql, Magento,CSS, HTML, jQuery, web designing and social API. You can subscribe to my blog via RSS/Twitter/Google plus and Facebook. parvez1487(at)gmail(dot)com

Random Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>