Hirvesh
Hirvesh

Reputation: 7982

Checking If A Link with a unique id is being clicked multiple times in jquery

I've got a page with multiple links with a class of reply which have a click event associated with them. Each link has a unique id. Clicking the link loads a div, with content unique to that link. What's the best best way to know if the same link is being clicked over and over again, so that I do not load the same div over and over again?

Upvotes: 0

Views: 134

Answers (1)

Ritesh
Ritesh

Reputation: 7522

Please have a look at one(). If you are using bind() then you have to just add $(this).unbind(event);. This will make sure that link is clicked only once to load a div.

Upvotes: 1

Related Questions