Alex
Alex

Reputation: 21

Jquery add events to dynamic elements

Greetings fellow coders :)
Through the API I'm using some HTML tags have events bound to them. My problem is I don't know how to add new elements(tags) that will have the same properties and events as the hardcoded elements.

Upvotes: 1

Views: 1649

Answers (1)

rcravens
rcravens

Reputation: 8390

You want to look into jquery live event bindings.

http://api.jquery.com/live/

This will let you define handlers for events that get applied to even dynamically created elements.

Bob

Upvotes: 3

Related Questions