简体   繁体   中英

Isotope shiftColumnOfItem combined with hashHistory - how to?

I'm using Isotope to filter a set of items and JQuery BBQ to handle the hashHistory stuff.

It's working fine, except for the following: the items are initially collapsed - when clicked, they expand and display more text. But when one of the items is expanded, the filtering info gets lost (which is obvious, as I'm not sending them on click yet) and I see all items again on screen.

On click for expanding the item, I'm now using just

$container.isotope('shiftColumnOfItem', this.parentNode);

I have been searching but still couldn't find a way of combining this method (or reLayout) with the current filtering/hash parameters. Any tips would be welcome!

Thank you.

After some more time tweaking the code, it's working.

It was actually more a general Javascript issue than something regarding specifically JQuery BBQ / Isotope.

I simply changed the markup for expanding/collapsing the item from

<a href="#" data-toggle="collapse" data-target="#item10-collapse">

to

<a href="javascript: void();" data-toggle="collapse" data-target="#item10-collapse">

This way, no hashChanges are registered.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM