Thursday, 15 March 2012

How to implement Multi checkbox filter in Jquery? -


Wired here:

Here I have applied several checkboxes with filters, but filter overrides Click on the second checkbox

EX: If I click on all shipping, Shipping will come down to the table but at the same time if I 1GB Clicking at the intersection should be shipping and 1 GB, but the shipping options must be overridden.

Like if I Shipping & amp; 1GB Only (Product) Memory 1 should only come (function () {var showAll = true; $ ('tr') No. ('(first) ($ (this) [0] is checked. ); Show value = $ (this) .val (); $ ('TD.' + + Condition + '[showAll = false; var status = $ (this) ()'. '(' Relay ' Parent ('tr'). Show ();}}), if (show all) {$ ('tr'). Show ();}}) ;

Try setting a filter and loop through filters and like them

  var $ check = $ ("input: checkbox"). Click (function () {var $ trs = $ ('tr') .No ('first'); var filters = {}, flag = false; $ checks.filter (': check') each (function () {Var rel = $ (this) .attr ('rel'); filter [rel] = filter [rel] || [?] (Flag) {$ trs.show (); $}; {$ tr .show ( ) ;; Each (filter, work (relay, list) is {$ trs.not (': (' + list.join () + ')'). Hide ();});} else {$ trs.show ();}});  

Demo:


No comments:

Post a Comment