开发者

e.preventDefault() is not working in IE6

开发者 https://www.devze.com 2023-01-09 19:05 出处:网络
开发者_如何转开发e.preventDefault() is not working in my IE6. Could you please provide some code to make it work in IE too?

开发者_如何转开发e.preventDefault() is not working in my IE6. Could you please provide some code to make it work in IE too?

I am using this function not anchor tag but on an image tag, so whenever somebody clicks on an image he should be ablt o drag over the image


in place of e.preventDefault() you could also return false; at the end of the code like this,

$('a').click(function(){
   // other codes
   return false;
});


Use this:

return false;

instead of e.prevendefault();


Try adding e.stop() or returning false at the end of your function.

0

精彩评论

暂无评论...
验证码 换一张
取 消