Multiple script execution on UI effects

Multiple script execution on UI effects


Hello out there!
I've posted this previously on the jQuery list, but I think it should
be posted in the dev list too.
If I use UI effects, all scripts in the shown content are executed
once again. An example:
<img src="button.jpg" onclick="$('#mydiv').show(.....)" />
<div id="mydiv" style="display: none">
<script type="text/javascript" src="myscript.js"></script>
<script type="text/javascript">
alert("test");
</script>
</div>
All external JavaScript files are loaded with an Ajax request and
executed again, all inline JavaScript things are simply executed when
the div is shown.
I can't image what the sense of this is. I am not loading external
content to my script, it is already there and has already been
executed. A re-execution causes errors.
Is there any chance to prevent jQuery from re-executing all script
tags?
Hope you can help.
Thanks in advance!
Matthias