jExpand.js 374 B

1234567891011121314
  1. (function($){
  2. $.fn.jExpand = function(){
  3. var element = this;
  4. $(element).find("tr:odd").addClass("odd");
  5. $(element).find("tr:not(.odd)").hide();
  6. $(element).find("tr:first-child").show();
  7. $(element).find("tr.odd").click(function() {
  8. $(this).next("tr").toggle();
  9. });
  10. }
  11. })(jQuery);