[jQuery] deferring script loading
Hi,
I have some javascript code (which makes use of jquery), that is
placed before the jquery library itself as in the following.
<script type="text/javascript">
javascript code which makes use of jquery
</script>
<script type="text/javascript" src="path/to/jquery"></script>
For reasons that it would be long to explain, I can't change the order
of the scripts.
Because of the order of the scripts I get of course the error: "$ is
not defined".
Is it possible, somehow, to defer the execution of the first script to
after the loading of jquery? Alternatively would it be possible to
anticipate the loading of jquery without placing it before the failing
script?
Any help would be very appreciated.
Many thanks
Francesco