Hello out there!

We're currently implementing jQuery into our community software to
increase usability and lifestyle (effects etc.)

The following problem makes me go crazy ;)

I want to show/hide a div with show()/hide(), sounds simple, but
jQuery behaves very strange. My example:

<img onclick="$('#mydiv').show()" />

<div id="mydiv">
  <!-- here goes my content -->
  <script type="text/javascript" src="myjs.js"></script>
  <!-- as you see, it may also contain javascript files, because
"stand-alone components" are printed in here
        which have to be independent -->
</div>

Now when i call $('#mydiv').show() - using UI effects - jQuery reloads
all the JavaScript files using an Ajax request like that:
myjs.js?_=1241241323 <-- current timestamp

I think jQuery does this because the JavaScript file could serve the
content for the div element, but i don't want that.

Sometimes it works (the Ajax request is done, everything is good), but
sometimes Firefox 3 shows a white page and the loading icon blinks all
the time. But the Ajax requests for alle the JavaScript files are
already finished.

Is there any chance to change that behavior of jQuery to not reload
that JavaScript files? Everything works until jQuery tries to reload
the files ... And I've found nothing via Google, so it seems to be a
very strange problem ...

Hope you can help me.

Kind regards,
Matthias

Reply via email to