I'd never claim to be a JS pro but what about creating a function to manage onload functions?
So when the script is called, onLoad="myloadingfunc();"
Code:function myloadingfunc() { clickmenu('gallery); initLightbox(); }
Hi guys
Hopefully a quick question and answer, I am having trouble using multi onload events in my <Body>. I am using the Scroller to control a news reel that runs along the top and I also want to utilise a photo lightbox on the same page. I have had both working individually but can not get them working together.
If anyone could point me in the right direction that would be awesome.Code:<script type="text/javascript" src="js/prototype.js"></script> <script type="text/javascript" src="js/scriptaculous.js?load=effects,builder"></script> <script type="text/javascript" src="js/lightbox.js"></script> <script type="text/javascript" src="js/jquery-1.2.6.pack.js"></script> <script type="text/javascript" src="js/jquery.li-scroller.1.0.js"></script> <script type="text/javascript"> $(function(){ $("ul#news-scroller").liScroll({travelocity: 0.04}); }); </script> <body onload="clickMenu('gallery'); initLightbox();">
Thanks in advance.
Mackenzie.
I'd never claim to be a JS pro but what about creating a function to manage onload functions?
So when the script is called, onLoad="myloadingfunc();"
Code:function myloadingfunc() { clickmenu('gallery); initLightbox(); }
“The best thing about a boolean is even if you are wrong, you are only off by a bit.”