首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >touchSwipe jquery单击问题

touchSwipe jquery单击问题
EN

Stack Overflow用户
提问于 2016-11-12 16:15:25
回答 1查看 373关注 0票数 0

我正在使用jquery的touchSwipe插件将swipe转换为单击。

它似乎是工作时,当我滑动页面,刷新或尝试到达下一页,但相同的内容正在显示。

我对下一次点击/滑动的代码行有疑问。

代码语言:javascript
复制
         window.location.href='http://something.com/aakarsha/2559277';

这是我的fiddle.Any帮助会很好

https://jsfiddle.net/bydbest/9gsgLqst/

这里是直接链接

http://something.com/aakarsha/2559277

代码语言:javascript
复制
  <html><body>
<p><div class="content_main_div div_100_per"><div id="timeline_content"><div><div class="content_box_main">


    <div class="messagelove_box" style="" ><div class="content_box_1">
         <div class="content_box_2z"><sup class="joke_icon"></sup></div>
         <div class="content_box_3_title"></div>
         <div class="content_box_3_text"><div style="position: absolute; top: 35%; left: 0%; margin: 0 auto; text-align: center;"></div>
<div style="position: absolute; top: 35%; right: 0%; margin: 0 auto; text-align: center;"></div>
<div id="detail_view" class="detail_view"><div class="detail_view_m" id="detail_view_m"><img src="http://image.something.com/misc/lazyg/aakarsha/people/aakarsha_aakarsha_photoshoot_stills_027_jpg_700_1052__mxoWV4za.sized.jpg" width="99%" alt="aakarsha" title="aakarsha"/><a href="http://something.com/aakarsha/2559276" class="view_pl" id="view_pl" hidefocus="true"></a>   
<a href="http://something.com/aakarsha/2559276" class="view_nr" id="view_nr" hidefocus="true"></a></div><a style="top: 188.5px;" id="view_prev" class="view_prev prev" href="http://something.com/aakarsha/2559276"></a>    
<a style="top: 188.5px;" id="view_next" class="view_next next" href="http://something.com/aakarsha/2559276"></a></div> </div><div class="content_box_5"><span class="vote" data-name="up" id="2559277"><span class="lipos">0 Likes</span></span></div> </div></div>
</div><script src="http://code.jquery.com/jquery-1.10.2.js"></script><script type="text/javascript" src="http://www.something.com/app/jquery.touchSwipe.min.js"></script>

<script type="text/javascript">
$("a").swipe({
  swipe: function(event) {
   window.location.href='http://something.com/aakarsha/2559277';

  },
   threshold: 75,
 excludedElements: "label, button, input, select, textarea, .noSwipe"
});

</script>   

</body>

</html>

我已经通过了github,并且意识到锚标记的阻塞,在javascript中也是如此。那它也不起作用

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-11-13 09:05:00

解决了问题。正是这种联系造成了问题。它工作得很好,now.enjoy

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/40564878

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档