As others have said, you must provide a function.
One way is to use existing code and wrap it with an anonymous function:
$("#sortHeader").click( function() { $(".tablesorter") .bind("sortStart",function(e, table) { $('.tablesorter').trigger('pageSet',0) }) } });
Another way is to name this function. If you gave your function a name and are still having problems, make sure you pass the function name without parentheses.
$("#sortHeader").click( myEventHanler ); // <-- function name without parens myEventHanler() { $(".tablesorter") .bind("sortStart",function(e, table) { $('.tablesorter').trigger('pageSet',0) }) } }
sealocal
source share