Jquery.column.picker

pick table columns out easily

View project onGitHub

Simple usage

jquery.column.picker can pick columns out easilly, whether use index array such as [0, 1, 2] to pickout first, second and third column, or use jquery select string such as "[name=hello]"

January February March April May June July August Septempber October November December
1 2 3 4 5 6 7 8 9 10 11 12
1 2 3 4 5 6 7 8 9 10 11 12
  $("button#winter").click(function(e) {
      // array of index number parameter
      // return jQuery wrapped array
      table.pickout( [9, 10, 11], true).each(function() {
          $(this).css("color", "yellow");
      });              
  });

  $("button#spring").click(function(e) {
      // selector string parameter
      table.pickout("th[catalog=spring]", true).each(function() {
             $(this).css("color", "cyan");
          });              
  });

  $("button#favorite").click(function(e) {
      // show the picked hide others
      table.pickout([5, 6, 7], true).showcol();
  });

  $("button#all").click(function(e) {
      // show all 
      table.pickout("th", true).showcol();              
  });