我搞乱TouchSwipe jQuery插件。通过向左滑动(上一篇文章)和右侧(下一篇文章),我成功添加了一种导航。如果我单独尝试使用我的代码片段,它会起作用,当我把它放在我的博客页面上时,与其他jQuery代码一起,无法工作......我没有特定的错误。我的第一个尝试之一是把jQuery.noConflict,但它不起作用。我不明白我卡在哪里 有什么帮助吗? 这是我的代码做了TouchSwipe jQuery插件导航
<script>
$(function() {
//Enable swiping...
$("#test").swipe({
//Generic swipe handler for all directions
swipeLeft: function(event, direction, distance, duration, fingerCount) {
window.location.href = "http://stackoverflow.com";
},
swipeRight: function(event, direction, distance, duration, fingerCount) {
window.location.href = "http://google.com";
},
threshold: 0
});
});
</script>
兄弟你能告诉我如何在我的网页上安装这个插件。我没有找到任何与它有关的文档 – Vikram