• Hi there,

    I have an ALM powered archive page which lists posts extracts with a “read more” link that makes the full post display below when clicked (I know, it’s a terrible design, not mine…). The idea there is to be able to fire masonry “layout” function on a “read more” click to refresh the masonry layout. Is there any way to access the masonry object created by Ajax Load More from my own javascript code?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Darren Cooney

    (@dcooney)

    Hi @mvauchel,
    I don’t believe you can access the built in Ajax Load More masonry function.

    But, I’m wondering if you could call layout() on the .alm-listing container that is already running masonry?

    let container = $('.alm-isting');
    container.masonry('layout');

    Might be worth a shot.

    Thread Starter Little Boy Running

    (@mvauchel)

    Hi @dcooney,
    That worked perfectly!
    I thought I tried this but I think I had a scope issue with the the container var not being defined in the right place.
    Many thanks!

    Plugin Author Darren Cooney

    (@dcooney)

    Wow, sweet!
    Thanks for following up!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to fire a masonry “layout” event?’ is closed to new replies.