Created
September 8, 2014 07:48
-
-
Save pommiegranit/9e2e4655bf9ca09b54b3 to your computer and use it in GitHub Desktop.
Initialization script for Tocca js in WordPress
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(document).ready(function($){ | |
$(gestures.container).on('dbltap', function(){ | |
jQuery(location).attr('href', gestures.destination ); | |
} | |
).on('swipeleft', function() { | |
var post_nav = jQuery('link[rel="next"]'); | |
if ( post_nav ) { | |
jQuery(location).attr('href', post_nav.attr('href')); | |
} | |
} | |
).on('swiperight', function() { | |
var post_nav = jQuery('link[rel="prev"]'); | |
if ( post_nav ) { | |
jQuery(location).attr('href', post_nav.attr('href')); | |
} | |
} | |
); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment