CMS + Isotope + URL method -> is-checked button

Hi everyone !

I’m tryin to do something simple : filtering a CMS collection with isotope BY URL.
By the way, thanks a lot @sabanna for your isotope’s tutorial wich is perfect.

I explain myself. First, here’s my read-only link to check code.

Now, look, here’s my page with CMS collection : page with no filter.
Now, there is my page with CMS collection + an URL method (#restaurants) wich is supposing to filter my collection by restaurants ONLY : page with filter by restaurant.
You can see my code is half working : button “Restaurant” is-checked.
BUT it’s not filtering my CMS collection.


I’m sure it’s a little code line somewhere, and I hope you can help me.

Thanks by advance <3

Looks like i fixed it solo !

Here’s is my solution
if(location.hash=="#restaurants"){ $("#button-toutes").removeClass("is-checked"); $("#restaurants").addClass("is-checked"); buttonFilter = $( '#restaurants' ).attr('data-filter'); $grid.isotope(); }

Hope it will help some people !