javascript - Isotope Filtering in Jquery -


I am trying to create a filter in which query and the following code works. How do I want to apply it to work with isotopic filtering.

HTML:

  & lt; div class = "tags" & gt; & Lt; Label & gt; & Lt; Input type = "checkbox" rel = "flower" /> Flower & lt; / Labels & gt; & Lt; Label & gt; & Lt; Input type = "checkbox" rel = "plants" /> Plants & lt; / Labels & gt; & Lt; Label & gt; & Lt; Input type = "checkbox" rel = "beach" /> Between and lieutenant; / Labels & gt; & Lt; / Div & gt; & Lt; div square = "photo plant flowers" style = "width: px; height: px;" & Gt; Image 1 & lt; / Div & gt; & Lt; div square = "photo flower beach" style = "width: px; height: px;" & Gt; Image 2 & lt; / Div & gt;   

jQuery:

  $ (function () {$ ('div.tags') .rep ('input: checkbox', 'change', Function () {var $ lis = $ ('. Photo'). Hide (); // $ ('input: check') for each check. Each (function () {$ lis.filter ('.' + $ (This) .attr ('rel')). Show ();});});});   

I can not do isotope filtering to work.

Here it is.

I do not know if I understand your question correctly and if it will help you

But this can be a solution

ex> & lt; script type = "text / javascript" & gt; $ (document) .ready (function () {var $ container = $ ('# Container') var $ checkbox = $ ('div.tags input') $ container.isotope ({item selector: '.item'}); $ checkboxes.change (function () {var arr = []; $ Checkboxes.filter (': check') Each (function () {arr.push (this.value);}); arr = arr.join (','); $ container.isotope ({filter: arr} );});}); & Lt; / scripts & gt;

If this solution does not meet your needs, then I apologize for you losing the time.

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -