...

View Full Version : Prototype Jquery conflict. Magento,



stiofansisland
06-25-2010, 05:27 PM
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.


<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>



<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>

:mad::mad:

Steven

stiofansisland
06-28-2010, 11:35 PM
no idea what the probem was but got it fiexedby using jquery 1.2.3 insted of 1.6.1



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum