Saturday 15 September 2012

html - Table Sorting with Javascript -



html - Table Sorting with Javascript -

i'm working on table filtering, can kind of function in fiddle when pop dw , test page loses functionality. have tried script on page , inserted page, i'm @ loss of turn next help appreciated. realize it's not finish , checkboxes arent set want know (at point) why lose functionality in dreamweaver - correction when test in browser through dreamweaver,i've uploaded test server , still no functionality.

fiddle

$("input[name='filterstatus'], select.filter").change(function () { var classes = []; var stateclass = "" $("input[name='filterstatus']").each(function() { if ($(this).is(":checked")) { classes.push('.'+$(this).val()); } }); $("select.filter").each(function() { if ($(this).val() != 'zz') { stateclass += "." + $(this).val(); } }); if (classes == "" && stateclass == "") { // if no filters selected, show items $("#statustable tbody tr").show(); } else { // otherwise, hide everything... $("#statustable tbody tr").hide(); // show matching items rows = $("#statustable tr" + stateclass).filter(classes.length ? classes.join(',') : '*'); if (rows.size() > 0) { rows.show(); } }

i sure jtable solve problem.

you need pass info in given example's format , allow filter, search , paginate data.

http://jtable.org/gettingstarted

javascript html table filtering

No comments:

Post a Comment