Isotope Elements Overlap How to Solve
How to Stop Overlapping Elements with isotope JS
I was struggling to get isotope elements to stop overlapping and I found something that showed me a couple of ways to fix it. The way I fixed it was by waiting for the whole script to load and then running isotope. The problem is that when it is loading the script the images on the isotope element might not be loaded already so you need to wait for that.
- Start isotope after the images have loaded..
$(window).load(function(){/*init plugin here*/})
- Use the imagesLoaded plugin: http://isotope.metafizzy.co/docs/help.html#imagesloaded_plugin
- call
reLayout
once the images are loaded$(window).load(function(){$('#thumbs').isotope('reLayout');});
- if the
li
elements are fixed size, then give them dimensions through CSS, andisotope
will pick them up..