开发者

Jquery add events to dynamic elements

开发者 https://www.devze.com 2023-02-20 23:15 出处:网络
Greetings fellow coders :) Through the API I\'m 开发者_Go百科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 propertie

Greetings fellow coders :)

Through the API I'm 开发者_Go百科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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消