Masonry, IS. Just, not loading.
-
Hi, I gave up trying to use JetPack IS, since although it triggers ‘post-load’ after loading, it doesn’t give you any way of dealing with the new elements directly. And I couldn’t get jQuery running for some reason, so there wasn’t much more to be done.
So I thought I’d try out this plugin.
I have:
<script type="text/javascript"> $(function () { var container = document.querySelector('#wrap'); var msnry = new Masonry( container, { itemSelector: '.item', gutter: 12, }); }); </script>
to initialise Masonry, which works fine.
Latest version of IS installed and activated:
content: #wrap
Content Selector #wrap
Navigation Selector .item #pag .box ul.paglinks
Next Selector .item #pag .box ul.paglinks li#older
Item Selector .item article
Behaviour Masonry/IsotopeCallback:
<script type="text/javascript"> var $newElems = $( newElements ).css({ opacity: 0 }); $newElems.imagesLoaded(function(){ $newElems.animate({ opacity: 1 }); $('#wrap').masonry( 'appended', $newElems, true ); }); </script>
Now I hate to say “IT DOESN’T WORK!”. But.. it’s not! Haha.
It’s not that it’s screwing with Masonry, it’s just not loading the next batch of posts.
What have I done wrong?
You can see it (not) in action here.
Thanks in advance!
- The topic ‘Masonry, IS. Just, not loading.’ is closed to new replies.