我正在使用jquery的touchSwipe插件将滑动转换为点击。
它似乎正在工作,因为当我刷页面刷新或尝试到达下一页但正在显示相同的内容时。
我对下一次点击/滑动的代码行有疑问。
window.location.href='http://something.com/aakarsha/2559277';
这是我的小提琴。任何帮助都会很棒
https://jsfiddle.net/bydbest/9gsgLqst/
这里是直接链接
http://something.com/aakarsha/2559277
<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中排除相同。然后它也不起作用
答案 0 :(得分:0)
解决了这个问题。这是导致问题的链接。它工作得很好nowenjoy