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,6 +109,8 @@ $(document).ready(function(){
}); });
} }
/* Swipe on mobile */
if (mobileBrowser()) {
$(document).swipe() $(document).swipe()
.on("swipeStart", function(e) { .on("swipeStart", function(e) {
swipe.start($("#image")); swipe.start($("#image"));
@ -118,11 +120,12 @@ $(document).ready(function(){
}) })
.on('swipeEnd', function(e) { .on('swipeEnd', function(e) {
swipe.stop(e.swipe, function() { swipe.stop(e.swipe, function() {
$("#imageview .arrow_wrapper.previous").click(); $("#imageview .arrow_wrapper.previous").trigger('touchend');
}, function() { }, function() {
$("#imageview .arrow_wrapper.next").click(); $("#imageview .arrow_wrapper.next").trigger('touchend');
}); });
}); });
}
/* Document */ /* Document */
$(document) $(document)