<body onload="load_jquery"> and declare function: how to ?
Hi,
I'm quite new with JQuery and sometimes I've problems with syntax.
Here is the actual code I have:
- <script type="text/javascript" src="includes/functions/jquery-1.4.2.min.js"></script>
- <script type="text/javascript" src="includes/functions/jquery.lightbox-0.5.min.js">
- <script type="text/javascript">
- $(function() {
- $('a.lightbox').lightBox(); // Select all links with lightbox class
- });
- </script>
- ...
- <script type="text/javascript" src="includes/functions/bannerRotator.js"></script>
- <script type="text/javascript">
- $(document).ready(function(){
- bannerRotator('#bannerRotator', 800, 4000);
- });
- </script>
What I'm trying to do is to load the 3 javascript files after the body is loaded and then declare the 2 function (lightbox and bannerRotator).
Unfortunately I've tried many things and none worked. If I can dynamically load the js scripts after body is loaded, I don't know how to declare the jQuery functions.
Hope somebody can help me with this.
Thank you for helping.