使用瀑布流代码是出现的问题。在火狐的firebug中。
cannot call methods on masonry prior to initialization; attempted to call method 'appended'
找到解决问题,需要在使用的时候,初始化一次,代码。
错误用法:
$('#itemshere').masonry( 'appended', $boxes );
正常用法
$('#itemshere') // initialize Masonry .masonry() // now okay to use methods .masonry( 'appended', $boxes );