Skip to content

Instantly share code, notes, and snippets.

@TerryMooreII
Last active December 20, 2015 03:29
Show Gist options
  • Save TerryMooreII/6064388 to your computer and use it in GitHub Desktop.
Save TerryMooreII/6064388 to your computer and use it in GitHub Desktop.
Jquery Mobile open panel by sliding by starting slide from left edge
(function(){
var swiperight = null;
$('body').on('touchstart vmousedown', function(e){
if (e.pageX < 20)
swiperight = e.pageX;
else
swiperight = null;
});
$('body').on('touchmove vmousemove', function(e){
if (swiperight && e.pageX - swiperight > 50 )
$('#mypanel').panel('open');
});
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment