简体   繁体   English

jQuery Flexslider无法在iphone和ipad中运行

[英]jQuery Flexslider not working in iphone and ipad

I need to remove class from li tag when i click or tap on the navigation arrow in flexslider. 当我点击或点击flexslider中的导航箭头时,我需要从li标签中删除类。 It is working perfectly in all my browsers but i can't able to produce the same in iphone and ipad.when i click on navigation arrow slider moves correctly using flexslider plugin code but alert in my code comes rarely not continuously 它在我的所有浏览器中都能完美运行,但是我无法在iphone和ipad中生成相同的功能。当我点击导航箭头滑块使用flexslider插件代码正确移动时,我的代码中的警报很少不连续

 $(".flex-direction-nav a.flex-next,.flex-direction-nav a.flex-prev").on('click', 'tap', function () {
    alert("hi");        
    $(".repeat-cont li.active-slide.open").removeClass("open");
});

Do you have any special properties for mobile or any idea on this code?I tried touchstart instead of tap. 你有任何移动特殊属性或任何关于此代码的想法吗?我尝试使用touchstart而不是tap。

The two events should be combined like "click tap" instead of "click", "tap" : 这两个事件应该像"click tap"而不是"click", "tap"

$(".flex-direction-nav a.flex-next,.flex-direction-nav a.flex-prev").on('click tap', function () {
    alert("hi");        
    $(".repeat-cont li.active-slide.open").removeClass("open");
});

Also, be sure you are using jquery mobile if you are using tap() 此外,如果您使用tap() ,请确保使用jquery mobile

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM