Limited swipe to mobile

This commit is contained in:
Tobias Reich 2014-03-26 23:43:17 +01:00
parent 7279c0a588
commit 9fbd2e183b
2 changed files with 17 additions and 14 deletions

File diff suppressed because one or more lines are too long

View File

@ -109,20 +109,23 @@ $(document).ready(function(){
});
}
$(document).swipe()
.on("swipeStart", function(e) {
swipe.start($("#image"));
})
.on('swipeMove', function(e) {
swipe.move(e.swipe);
})
.on('swipeEnd', function(e) {
swipe.stop(e.swipe, function() {
$("#imageview .arrow_wrapper.previous").click();
}, function() {
$("#imageview .arrow_wrapper.next").click();
/* Swipe on mobile */
if (mobileBrowser()) {
$(document).swipe()
.on("swipeStart", function(e) {
swipe.start($("#image"));
})
.on('swipeMove', function(e) {
swipe.move(e.swipe);
})
.on('swipeEnd', function(e) {
swipe.stop(e.swipe, function() {
$("#imageview .arrow_wrapper.previous").trigger('touchend');
}, function() {
$("#imageview .arrow_wrapper.next").trigger('touchend');
});
});
});
}
/* Document */
$(document)