Jquery click event assignment not working in Firefox
- by Mantorok
Hi all
I'm assigning a click event to a bunch of anchors by class name, and it works in all browsers except Firefox, here is the JS:
var click_addthis = function(e, href) {
if (!e) {
var e = window.event;
}
e.cancelBubble = true;
if (e.stopPropagation) e.stopPropagation();
window.open(href, "Share It", null);
return false;
}
$(document).ready(function() {
$(".addthis_button_facebook").click(function() { click_addthis(event, this.href) });
$(".addthis_button_twitter").click(function() { click_addthis(event, this.href) });
});
Am I missing something?
Thanks