开发者

How Can I add(prepend) an image when I clicked the dynamic element

开发者 https://www.devze.com 2023-02-25 00:49 出处:网络
I want to prepend an image.When I clickedelement(this) and my items becoming dynamic.. How can I do that? Sorry 开发者_StackOverflowabout my englishtry live

I want to prepend an image.When I clicked element(this)

and my items becoming dynamic..

How can I do that? Sorry 开发者_StackOverflowabout my english


try live

jQuery('#idOfElement').live('click' ,function() {
          jQuery(this).prepend('<img src="">');
});

live: Attach a handler to the event for all elements which match the current selector, now and in the future.

0

精彩评论

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