使用瀑布流代码是出现的问题。在火狐的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 );
本文介绍了一个常见的瀑布流布局Masonry插件错误:在未初始化的情况下尝试调用方法。文章提供了错误示例及正确的解决方法,确保Masonry插件能够正确加载和显示元素。
8401

被折叠的 条评论
为什么被折叠?



