jQuery click event fired twice in firefox but not in IE

匿名 (未验证) 提交于 2019-12-03 01:42:02

问题:

I've got an image like this:

<img class="linkDelete" src="some_path"/>

I use jQuery click event on the image:

$('.linkDelete').click(function(event) {     event.preventDefault();     $(location).attr('href', some_location); });

The event is fired twice in Firefox but once in IE. I'd like to know if there's a solution to make it fire only once in Firefox? Thanks :)

PS: I tried by deleting the href="#" in the img tag. No use...

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!