jQuery click event fired twice in firefox but not

2019-09-08 15:27发布

问题:

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...