Shadowing Posted June 17, 2012 Share Posted June 17, 2012 Hey guys I ran into this problem where it appears that jquery seems to be triping more then once when reading clicks. Am i suppose to be doing something to prevent this? Its a button linked to an ajax script and its meant to be clicked more then once. I notice one click can be up to 6 clicks some times. but usually twice. $("input#advance").live('click' ,function(event) { event.preventDefault(); buildings("advance"); }); Link to comment Share on other sites More sharing options...
Ingolme Posted June 17, 2012 Share Posted June 17, 2012 Have you checked that you're not accidentally adding multiple event handlers to the same element? Link to comment Share on other sites More sharing options...
Shadowing Posted June 18, 2012 Author Share Posted June 18, 2012 thanks for the reply well i notcie i had several buttons sharing the same class name that im not using for the click. The class was on a td tag.Getting rid of that seem to of fixed it I think. I dont think i have any code using that class as a click plus i dont see why it would trip the same click more then once, if anything it would just click all the tags with that class. hmm maybe i have a ending tr tag off or something or td tag and so it trips it more then once that way since its reading. will look at that Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now