In a jquery-mobile based web app, how do i prevent the default browser menu from showing on "tap hold" .. instead i want to show a custom dialog page ..
mentioned below is my code as of now ..
$(".task_row").bind('taphold',function(event, ui){
event.preventDefault();
$("#slide_down_menu").trigger('click');
});
use css:
a {
-webkit-touch-callout: none !important;
}
to not show the standard dialog
I found out you have to disable right-clicking.
$(function(){
document.oncontextmenu = function() {return false;};
$(document).mousedown(function(e){
if ( e.button == 2 )
{
alert('Right mouse button!');
return false;
}
return true;
});
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With