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 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jun 2010
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Prototype Jquery conflict. Magento,

    Hi All,

    Been at this for ages, cant seem to get to the bottom of it,

    if i put the prototype.js first the checkout and the light box works but the slider dosent, if i put it after the "http://www.electricsun.co.uk/new/js/index.php?c=..." the slider works but the lightbox and add to cart button dosent work?

    Any Help really appreciated.

    Code:
    <script type="text/javascript" src="http://www.electricsun.co.uk/new/js/index.php?c=auto&amp;f=,prototype/validation.js,scriptaculous/builder.js,scriptaculous/effects.js,scriptaculous/dragdrop.js,scriptaculous/controls.js,scriptaculous/slider.js,varien/js.js,varien/form.js,varien/menu.js,mage/translate.js,mage/cookies.js,varien/product.js,calendar/calendar.js,calendar/calendar-setup.js" ></script>
    <script type="text/javascript" src="http://www.electricsun.co.uk/js/prototype/prototype.js" ></script>

    Code:
    <script type="text/javascript" src="http://www.electricsun.co.uk/new/js/index.php?c=auto&amp;f=,prototype/validation.js,scriptaculous/builder.js,scriptaculous/effects.js,scriptaculous/dragdrop.js,scriptaculous/controls.js,scriptaculous/slider.js,varien/js.js,varien/form.js,varien/menu.js,mage/translate.js,mage/cookies.js,varien/product.js,calendar/calendar.js,calendar/calendar-setup.js" ></script>
    <script type="text/javascript" src="http://www.electricsun.co.uk/js/prototype/prototype.js" ></script>
    
    <link rel="stylesheet" type="text/css" href="http://www.electricsun.co.uk/new/skin/frontend/default/jm_purity/css/addons.css" media="all" />
    <link rel="stylesheet" type="text/css" href="http://www.electricsun.co.uk/new/skin/frontend/default/jm_purity/css/layout.css" media="all" />
    <link rel="stylesheet" type="text/css" href="http://www.electricsun.co.uk/new/skin/frontend/default/jm_purity/css/theme.css" media="all" />
    <link rel="stylesheet" type="text/css" href="http://www.electricsun.co.uk/new/skin/frontend/default/jm_purity/css/menu.css" media="all" />
    <link rel="stylesheet" type="text/css" href="http://www.electricsun.co.uk/new/skin/frontend/default/jm_purity/css/css3.css" media="all" />
    <link rel="stylesheet" type="text/css" href="http://www.electricsun.co.uk/new/skin/frontend/default/jm_purity/css/slider.css" media="all" />
    <link rel="stylesheet" type="text/css" href="http://www.electricsun.co.uk/new/skin/frontend/default/jm_purity/css/print.css" media="print" />
    <link rel="stylesheet" type="text/css" href="http://www.electricsun.co.uk/new/js/calendar/calendar-win2k-1.css"  />
    <link rel="stylesheet" type="text/css" href="http://www.electricsun.co.uk/new/skin/frontend/default/default/css/easylightbox.css" media="all" />
    
    <script type="text/javascript" src="http://www.electricsun.co.uk/new/skin/frontend/default/default/js/lightbox.js" ></script>
    
    <!--[if IE]>
    <link rel="stylesheet" type="text/css" href="http://www.electricsun.co.uk/new/skin/frontend/default/jm_purity/css/ie.css" media="all" />
    <![endif]-->
    <!--[if lt IE 7]>
    <script type="text/javascript" src="http://www.electricsun.co.uk/new/js/index.php?c=auto&amp;f=,lib/ds-sleight.js,varien/iehover-fix.js" ></script>
    <link rel="stylesheet" type="text/css" href="http://www.electricsun.co.uk/new/skin/frontend/default/jm_purity/css/ie7minus.css" media="all" />
    <![endif]-->
    <script type="text/javascript">var Translator = new Translate([]);</script>
    
    <link rel="stylesheet" href="http://www.electricsun.co.uk/new/skin/frontend/default/default/css/colors/default.css" type="text/css" />
    <script type="text/javascript" src="http://www.electricsun.co.uk/new/skin/frontend/default/jm_purity/js/ja.script.js"></script>
    <script type="text/javascript">
    var headline_count;
    var current_headline=0;
    
    
    
    function headline_rotate() {
      old_headline = current_headline % headline_count;
      new_headline = ++current_headline % headline_count;
      $j("div.headline:eq(" + old_headline + ")").css('top', '5px').animate({top: 210},1000);
      $j("div.headline:eq(" + new_headline + ")").css('top', '-210px').animate({top: 5},1000);     
    }
    </script>
    
    <!-- CSS -->
    <script type="text/javascript" src="http://www.electricsun.co.uk/js/jquery.js"></script>
    <script type="text/javascript" src="http://www.electricsun.co.uk/js/s3Slider.js"></script>
    
    	<script type="text/javascript">
    
    	var $j = jQuery.noConflict();
    
        $j(document).ready(function() {
    							   headline_count = $j("div.headline").size();
      $j("div.headline:eq("+current_headline+")").css('top', '5px');
      setInterval(headline_rotate,6000); //time in milliseconds
             $j('#slider').s3Slider({
                timeOut: 3000
            });
    		 $j('#slider4').s3Slider({
                timeOut: 3000
            });
    		
        });
    </script>


    Steven

  • #2
    New to the CF scene
    Join Date
    Jun 2010
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    no idea what the probem was but got it fiexedby using jquery 1.2.3 insted of 1.6.1


  •  

    Posting Permissions

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