admin管理员组文章数量:1415460
I am using Flexslider settings in Woocommerce to modify the image slider on the single product page. / Support for this is added into Woocommerce by default.
I have entered the below code into my functions.php in order to set 'touch' to true and enable finger swiping on touch devices. I have confirmed that this works on a mobile device. However this doesnt work on my Surface Pro 3 (also a touch device). It works only when in Chrome DevTools, if I press the device size toggle and then press refresh. However when I close DevTools and refresh again, it stops working.
add_filter("woocommerce_single_product_carousel_options", "change_flexslider_options", 10);
function change_flexslider_options($options) {
$options = array(
'rtl' => is_rtl(),
'animation' => 'slide',
'smoothHeight' => false,
'directionNav' => true,
'controlNav' => true,
'slideshow' => false,
'animationSpeed' => 500,
'animationLoop' => false,
'touch' => true,
);
return $options;
}
I am not sure how to have flexslider recognise whether the desktop is or isnt a touch device.
本文标签: jqueryWoocommerce Flexslider touch functionality on desktop not working
版权声明:本文标题:jquery - Woocommerce Flexslider touch functionality on desktop not working 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745153961a2645056.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论