About

Labels

slider

Recent

Navigation

Callback after Masonry load

Masonry a great library to create dynamic layouts, but what if you want to call any function once the masonry is being called and worked. I checked the Masonry docs but didn't found anything useful. So what I did is to use jQuery's deferred method that have some awesome functions.
When I tried a few ways only this method works.
$.when(
// Call Masonry
).done(
// Callback goes here
); 
See the Pen qERQLP by Mohammad Hamza Dhamiya (@hamzadhamiya) on CodePen.

For Infinite Scrolling the above mentioned method won't work. But for infinite scrolling read Masonry's Docs.
Share
Banner

Muhammad Hamza

Themelet provides the best in market today. We work hard to make the clean, modern and SEO friendly blogger templates.

Post A Comment:

0 comments: