Menu icon Foundation
Isotope in a Tab

Hello everybody
I'm new to Foundation 5 and struggling with a problem for days now.
I use multiple instances of Isotope in a tab. Isotope displays correctly in the active tab but when i switch to another one, all isotope items are collapsed in this tab.
Is there a way to reload isotope after switching between tabs or what would be the best way to solve this problem?

Here is the JSFiddle:
http://jsfiddle.net/mideyahdotch/bnvzqzve/11/

Thanks a lot for support.
M.

isotopetab

Hello everybody
I'm new to Foundation 5 and struggling with a problem for days now.
I use multiple instances of Isotope in a tab. Isotope displays correctly in the active tab but when i switch to another one, all isotope items are collapsed in this tab.
Is there a way to reload isotope after switching between tabs or what would be the best way to solve this problem?

Here is the JSFiddle:
http://jsfiddle.net/mideyahdotch/bnvzqzve/11/

Thanks a lot for support.
M.

Rafi Benkual almost 5 years ago

According to the docs you can use
Javascript
$container.isotope('reloadItems')
// or with vanilla JS
iso.reloadItems()

http://isotope.metafizzy.co/methods.html

mideyah almost 5 years ago

Thanks Rafi,
Im not sure if i put the code at the right place. anyway its not working.
I guess its because i use isotope in a tab, im looking for a way to trigger reloadItems or reLayout when the user switch a tab.
I found this via stackoverflow: http://jsfiddle.net/Vc6Vk/1/
Its a solution for handle this in Bootstrap, im sure there is something similar for Foundation.
Regards