I have a fairly simple script that listens for a click event on a class this works fine on the first time it is clicked. but the problem is when an additional button is pressed it will execute the function more than once. I have read this is due to each new button press creates a new event handler but how am I suppose to resolve this?
the JQuery code I have is
$('.ButShare').on('click', function() {
var id = $(this).attr('id');
alert(id);
});
This is the simplified code that I have which still displays the symptoms
Regards
Vip32
clickevent to only first.ButShareelement ?