jQuery .clone() .html() in IE Bug

后端 未结 2 1464
执笔经年
执笔经年 2021-01-14 09:59

There seems to be a bug still present in jQuery 1.6.2 that has an issue with .clone() and .html(). I created a fiddle: http://jsfiddle.net/Vxyu3/12/ that should help explain

相关标签:
2条回答
  • 2021-01-14 10:54

    Had to get around this by throwing the cloned object into a another div, hiding that div, and then appending its contents each time. Annoying and makes for longer code, but it's about the only thing that works right now.

    0 讨论(0)
  • 2021-01-14 10:58

    May be a closure reference bug. Try defining the cloned parameter in global scope, but keep the assignment within the ready callback.

    No, that doesn't work. It looks like a jQuery/IE bug where using a jQuery object for the HTML() function causes some problems.

    Try this instead: domCloneMe.html(cloned.html());

    0 讨论(0)
提交回复
热议问题