Hello, If I clone some html that includes a script tag, the script gets clone. However, if I then do an insertAfter() with that clone, the script tag gets lost.
Example (using jquery-1.3.2): <div id="clone_me"> <script> ({option_a: 17}); </script> <span>Hello</span> </div> <button onclick="jQuery('#clone_me').clone(true).insertAfter(jQuery (this));" value="click me"/> jQuery('#clone_me').clone(true).find('script').text() -> "({option_a: 17});" jQuery('#clone_me').clone(true).insertAfter(jQuery(this)).find ('script').text() -> "" I thought I had found a relatively elegant way of passing Javascript options for an element. It keeps the options with the associated elements, doesn't pollute the namespace, and doesn't break XHTML compliance like adding attributes to the tag would. Does anybody have either a way to not lose the script tags or a clean mechanism for passing element metadata to Javascript? thanks, Bryan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery (English)" group. To post to this group, send email to jquery-en@googlegroups.com To unsubscribe from this group, send email to jquery-en+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-en?hl=en -~----------~----~----~----~------~----~------~--~---