I have a button that calls a javascript function using an event handler. For some reason, the event handler is being called twice.
Here is my button (I am using a ph
Maybe you are attaching the event twice on the same button. What you could do is unbind any previously set click events like this:
$('.addToCartButton').unbind('click').click(function() {
alert("bob");
//addToCart($(this).attr("id"));
});
This works for all attached events (mouseover, mouseout, click, ...)