For infinitescroll am using the free extension: 'vs-infinite-ajax-scrolling', this extension provides noconfilct workaround too jquery version it imports is 1.7.2, am looking for a way to implement masonry.js from desendro with this extension and integrate both in default magento. can anyone please guide me on the same.
1条回答 默认 最新
- douzhe1264 2014-12-11 12:44关注
See http://masonry.desandro.com/#getting-started for instructions.
Magento probably has the item listings looking something like this:
<ul class="products-grid"> <li class="item">...product info here...</li> <li class="item">...product info here...</li> <li class="item">...product info here...</li> </ul>
So. Following the instructions on Masonry's homepage you need to first make sure that the Masony JS in included in you page section, by adding it to some of you XML - for example your theme's local.xml file in the default section or perhaps just in the catalog listing section so it won't be included on pages where it's not needed.
If you can't figure out how to do this, ask a new question on how to add a custom JS to product listing pages. This is what I meant by being specific. You need to do the initial work, breaking up your problem into smaller parts and asking questions based on the specific task at hand. Nobody on the internet likes to do what I'm doing and holding your hand all through the process. On their spare time. For free.
Next up is to initialize the Masonry script on the product listing using one of the two methods available and described on their homepage. For example you can add this to the -tag:
<ul class="products-grid js-masonry" data-masonry-options="{ 'columnWidth': 200, 'itemSelector': '.item' }"> <li class="item">...product info goes here..</li> <li class="item">...product info goes here..</li> <li class="item">...product info goes here..</li> </ul>
And it should probably work, maybe with some added CSS fixes.
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报
悬赏问题
- ¥100 微信小程序跑脚本授权的问题
- ¥100 房产抖音小程序苹果搜不到安卓可以付费悬赏
- ¥15 STM32串口接收问题
- ¥15 腾讯IOA系统怎么在文件夹里修改办公网络的连接
- ¥15 filenotfounderror:文件是存在的,权限也给了,但还一直报错
- ¥15 MATLAB和mosek的求解问题
- ¥20 修改中兴光猫sn的时候提示失败
- ¥15 java大作业爬取网页
- ¥15 怎么获取欧易的btc永续合约和交割合约的5m级的历史数据用来回测套利策略?
- ¥15 有没有办法利用libusb读取usb设备数据