Javascript fotorama单击“选择”中的“触发缩略图”
我曾经在我的网站上使用fotorama插件。我的问题是,当我通过selectbox选择其他产品时,缩略图不会改变 我需要在缩略图上添加数据serialid=“xxx” 任何建议都很好 多谢各位Javascript fotorama单击“选择”中的“触发缩略图”,javascript,jquery,select,fotorama,Javascript,Jquery,Select,Fotorama,我曾经在我的网站上使用fotorama插件。我的问题是,当我通过selectbox选择其他产品时,缩略图不会改变 我需要在缩略图上添加数据serialid=“xxx” 任何建议都很好 多谢各位 拇指1需要选择 拇指2需要选择 拇指3需要选择 拇指4需要选择 我需要用selectbox更改缩略图 试试这个: var fotorama=$('.fotorama').fotorama(); changeThumb=功能(obj){ var fotoramaApi=fotorama.data('f
拇指1需要选择
拇指2需要选择
拇指3需要选择
拇指4需要选择
我需要用selectbox更改缩略图
试试这个:
var fotorama=$('.fotorama').fotorama();
changeThumb=功能(obj){
var fotoramaApi=fotorama.data('fotorama');
fotoramaApi.show($(obj.val());
}
拇指1需要选择
拇指2需要选择
拇指3需要选择
拇指4需要选择
我需要用selectbox更改缩略图
我在寻找Magento 2解决方案时发现了这个问题
可能对某些人有帮助:
jQuery("#product-options-wrapper .super-attribute-select").click(function() {
jQuery('.fotorama').on('fotorama:ready', function (e, fotorama) {
fotorama.show(0);
});
});
非常感谢你。我需要最后一件事。如何在图像上添加数据属性?因为我需要通过数据属性更改拇指。如果可以。如果我们使用任何插件,那么我们应该使用它们可用的
方法
或Api
选项Fotorama
只能选择使用图像索引更改拇指再次感谢。我接受你的回答。下一步,我需要弄清楚如何在图像上添加数据属性以更改缩略图。@atakanaydın欢迎,用可用的插件选项更新了我的答案以更改缩略图。希望有帮助!谢谢