I am new to javascript plugins. So this is my question pertaining to it (with respect to the jQuery masonry).
I noticed the latest masonry.js has imagesLoaded inside it. Then I also noticed that the masonry website suggests users download the imagesLoaded plugin.
Side Note: I came to this conclusion after noticing that my masonry object loads just fine the FIRST time, but on subsequent loads masonry throws an error when i try to initialize it. Though regardless, the imagesLoaded seems to run just fine WITHOUT including the imagesLoaded plugin file itself.
The bug that I was seeing was due to my not 'deleting' the masonry contents before updated it with new content. So this is not an issue with the updated imagesLoaded.js
jQuery Masonry includes an outdated version of the jQuery imagesLoaded plugin v1.1.0.
As of July 30, 2012, the lastest version of jQuery imagesLoaded plugin is v2.0.1 https://github.com/desandro/imagesloaded/blob/master/jquery.imagesloaded.js
You can upgrade jQuery imageloaded from version 1.1.0 to 2.0.1 by including the script after jQuery Masonry.
However, I'm not sure if the upgrade will break anything. But from your question it seems that it does.
jQuery Masonry and jQuery imagesLoaded are different projects by the same person, desandro.
Since jQuery Masonry recommends that you use jQuery imagesLoaded, he make it part of the source so you don't have to import another file.
It easier to import one script instead of two.
When you include the lastest version of jQuery imagesLoad, by importing the seperate script, you're overwriting the old reference to the function call.
The lastest versions of jQuery imagesLoad has cleaner code but both version seem to have the same functionality.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With