Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Dec 2010
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    javascript conflict (collapsible and slideshow)

    Got some javascript thats conflicting and I'm new to java. One works when I remove the other & vice versa, but not together. Any idea how to make these work? I found what looked like to be an answer, but what I tried didn't work. http://api.jquery.com/jQuery.noConflict/

    Any help offered would be appreciated! Page is here http://lpsolutions-inc.com/newsite/index-test.html The collapsible elements are "About Us" and "Product Lines".


    Code:
    <!--Slideshow-->
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
    <script type="text/javascript" src="http://cloud.github.com/downloads/malsup/cycle/jquery.cycle.all.2.74.js"></script>
    <script type="text/javascript"> 
    $(document).ready(function() {
        $('.slideshow').cycle({
    		fx: 'fade' 
    	});
    });
    </script>
    
    <!--dropdown-->
    <script src="javascripts/prototype.js" type="text/javascript"></script>
    <script src="javascripts/scriptaculous.js?load=effects" type="text/javascript"></script>

  • #2
    Senior Coder
    Join Date
    Feb 2009
    Location
    Ilkley, West Yorkshire, UK
    Posts
    2,956
    Thanks
    9
    Thanked 727 Times in 721 Posts
    You need to change your jQuery to:

    Code:
    $.noConflict();
    jQuery(document).ready(function($) {
        $('.slideshow').cycle({
    		fx: 'fade' 
    	});
    });

  • Users who have thanked SB65 for this post:

    marybeth320 (12-14-2010)

  • #3
    New to the CF scene
    Join Date
    Dec 2010
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Works perfect, thank you so much!! I've never edited js for something like this so was very lost. Thank you


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •