开发者

Clone elements and load previously loaded scripts

开发者 https://www.devze.com 2023-01-01 04:40 出处:网络
I am 开发者_StackOverflowusing clone() to move certain elements into another place in the DOM, but had trouble due to the fact that the scripts previously rendered was not available anymore when calle

I am 开发者_StackOverflowusing clone() to move certain elements into another place in the DOM, but had trouble due to the fact that the scripts previously rendered was not available anymore when called from the cloned elements.

So I think I need to call them again, but one by one will be a PITA. Perhaps getScript will do, but I have no idea to call more than one.

Any help would be very much appreciated. Thanks


This seems like what I need:

http://code.google.com/p/jquery-loadscript/

UPDATE: Actually when I use append() rather than clone(true), the events handlers are retained. So there is no need to reload scripts nor clone(), doh :)

The forms actions are not affected so far.

0

精彩评论

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