PDA

View Full Version : Script wont load



funkyfela
11-01-2011, 10:10 AM
Hi,
pls i have two script that i want to load on my page but the two just wont work together. one a javascript and the other a jquery. i have used the jquer.noConflict() but it still didnt work. pls how can i get it to work.
this is the head section of the pagei want it displayed.


<link rel="stylesheet" href="styles.css" type="text/css" />
<link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" />
<script type="text/javascript" src="scripts/jquery-1.4.1.min.js"></script>
<script type="text/javascript" src="scripts/jquery.slidepanel.setup.js"></script>
<script type="text/javascript" src="scripts/jquery.cycle.min.js"></script>
<script type="text/javascript" src="scripts/jquery.cycle.setup.js"></script>
<script type="text/javascript">
jQuery.noConflict();
</script>
<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>


ps: i didnt modify any of the script. i left it as is.

thanks

azoomer
11-01-2011, 08:33 PM
Maybe this thread (http://www.dynamicdrive.com/forums/showthread.php?t=47732) could be of help. Otherwise you could use a jquery based lightbox clone like slimbox2 (http://www.digitalia.be/software/slimbox2) or fancybox (http://fancybox.net/) to avoid the conflict.

traq
11-02-2011, 01:46 AM
colorbox (http://jacklmoore.com/colorbox/) is another good jquery plugin.

I would recommend using a jquery lightbox over trying to solve the conflicts in this case - unless there's something that absolutely depends on prototype/scriptaculous, you'll drastically reduce the amount of scripts you need to load by using only one library.

(Also, all of the scripts you mention are "javascript." jQuery is a javascript function library, just like prototype is. They're not different scripting languages.)

funkyfela
11-02-2011, 12:24 PM
I finally got it working. from an old thread from john. he said I should change the $ of my setup files to jquery and to update my jquery file to 1.6.x. after that it worked. but I discovered two things first after getting my page to load properly, I decided to do a little tweaking. I removed the jquery.noscript and it still worked. secondly I also used my old jquery script (1.4.x) it also worked. I now realize that what really did the magic is changing the $ sign of my setup files to jquery.

thanks and hope this helps someone.