javascript - Mansory works only after refreshing (jquery) (Ruby on rails) -


my posts.js.coffee

$ ->   $('#posts').masonry itemselector: '.box'   $container = $('#posts')   $container.imagesloaded ->     $container.masonry()     return   return 

work after refreshing page, otherwise have posts in 1 column. 1 after other. can do? answers

i solved problem using

jquery-turbolinks gem

when configured app jquery-turbolinks documentation mansory gem works well!


Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -