Thursday, 5 September 2013

why the taphold event not work on button click?

why the taphold event not work on button click?

I want to get long press event .So I try taohold event in jquery mobile
.But when I add on button it not call.
I do like that on fiddle
<button id="test">Test</button>
$('#test').bind('taphold', function(e) {
alert("jj") ;
e.preventDefault();
return false;
} );
$(function(){
$( "#test" ).bind( "taphold", tapholdHandler );
function tapholdHandler( event ){
alert("jjghfhg") ;
}
});

No comments:

Post a Comment