write jquery plugin
Posted
by tazphoenix
on Stack Overflow
See other posts from Stack Overflow
or by tazphoenix
Published on 2010-04-26T16:50:01Z
Indexed on
2010/04/26
16:53 UTC
Read the original article
Hit count: 172
jQuery
hi.i wrote a jquery function and now i want to use it as a plugin so i could use that more than 1 place.the code lookes like this:
function loadTable(){
$.post("includes/action.php", {action: "gettable"}, function(html){
$("#tblstudents tbody").html(html);
$("#tblstudents")
.tablesorter({widthFixed: false, widgets: ['zebra'], sortList: [[0,0]]})
.tablesorterPager({container: $("#pager")})
.tablesorterFilter({filterContainer: $("#filter-box"), filterClearContainer: $("#filter-clear-button")});
});
}
And I want it have functions for setting "includes/action.php" and "gettable" in $.post function and $("#pager") ,$("#filter-box") and $("#filter-clear-button") from $("#tblstudents").Can anyone help me?
© Stack Overflow or respective owner