Is it a known issue that various domManip actions can case javascript
inside script tags to fire twice? For example if I have this example


<div id="myDiv>
<script type="javascript">
alert("Hello World");
</script>
</div>

and somewhere else in the page I use the collowing jQuery:

<script type="javascript">
$(document).ready(function() { $(#myDiv).wrapAll("<div class=wrapper></
div>"); });
</script>

then what happens is the "Hello World" alert gets triggered twice.
Once when the page loads and once when the div gets wrapped.

Can options be added to the DomManip functions so that it doesn't
evaluate scripts tags contained in the DOM element being wrapped? (or
better yet detects if the elements are already embedded in the DOM and
executes then as appropriate)

Thank
Jon

Reply via email to