Hi everyone, I am having the following problems using multiple scripts on one page of my HTML. Only the lightbox script works, however the accordion doesn't work Here is my code: <script type="text/javascript" src="scripts/jquery-1.5.1.min.js"></script> <script src="scripts/prototype.js" type="text/javascript"></script> <script src="scripts/scriptaculous.js" type="text/javascript"></script> <script src="scripts/lightbox.js" type="text/javascript"></script> <script src="scripts/effects.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function(){ $(".accordion h3").eq(2).addClass("active"); $(".accordion p").eq(2).show(); $(".accordion h3").click(function(){ $(this).next("p").slideToggle("slow") .siblings("p:visible").slideUp("slow"); $(this).toggleClass("active"); $(this).siblings("h3").removeClass("active"); }); }); Code (markup): Any ideas on how this may work?? Thanks
In case one of the other libraries uses $, try <script type="text/javascript" src="scripts/jquery-1.5.1.min.js"></script> <script src="scripts/prototype.js" type="text/javascript"></script> <script src="scripts/scriptaculous.js" type="text/javascript"></script> <script src="scripts/lightbox.js" type="text/javascript"></script> <script src="scripts/effects.js" type="text/javascript"></script> <script type="text/javascript"> jQuery(document).ready(function(){ jQuery(".accordion h3").eq(2).addClass("active"); jQuery(".accordion p").eq(2).show(); jQuery(".accordion h3").click(function(){ jQuery(this).next("p").slideToggle("slow").siblings("p:visible").slideUp("slow"); jQuery(this).toggleClass("active"); jQuery(this).siblings("h3").removeClass("active"); }); }); Code (markup): Or see the jQuery site for help with $.noConflict().
I agree with Rukbat Use jQuery replace for $ or use noConflict functions will help you to solve it. and check your effects.js too