Ver Mensaje Individual
  #1 (permalink)  
Antiguo 21/11/2012, 09:26
chussman81
 
Fecha de Ingreso: noviembre-2012
Mensajes: 3
Antigüedad: 11 años, 5 meses
Puntos: 0
Conflicto jquery y motools parcialmente corregido

Hola compañeros, necesito vuestra ayuda!

Estoy depurando una de mis webs, que carga un slider en la página principal hecho en jQuery y que entra en conflicto con las librerías de Motools que carga en la cabecera (imagino que necesarias para el slimbox de la galería de imágenes)

El caso es que conseguí solucionarlo de forma correcta estableciendo éste código:

<script src="<?php echo $this->baseurl;?>/templates/<?php echo $this->template;?>/js/slides.min.jquery.js"></script>
<script type="text/javascript">

var j = jQuery.noConflict();
j(window).load(function(){
j('#slides').slides({
preload: true,
preloadImage: '<?php echo $this->baseurl;?>/templates/<?php echo $this->template;?>/images/load_slide.gif',
<?php if($this->params->get('sliderEffect') == 1) : ?>effect: 'fade',<?php endif; ?>
<?php if($this->params->get('sliderEffect') == 2) : ?>effect: 'slide',<?php endif; ?>
crossfade: false,
slideSpeed: <?php echo $this->params->get('sliderChange'); ?>,
fadeSpeed: <?php echo $this->params->get('sliderChange'); ?>,
<?php if($this->params->get('sliderArrows') == 0) : ?>
generateNextPrev: false,<?php endif; ?>
<?php if($this->params->get('sliderArrows') == 1) : ?>
generateNextPrev: true,<?php endif; ?>
<?php if($this->params->get('sliderPagination') == 0) : ?>
generatePagination: false,<?php endif; ?>
<?php if($this->params->get('sliderPagination') == 1) : ?>
generatePagination: true,<?php endif; ?>
<?php if($this->params->get('sliderAuto') == 1) : ?>
play: <?php echo $this->params->get('sliderTime'); ?>,
<?php endif; ?>
autoHeight: true,
<?php if($this->params->get('hoverPause') == 2) : ?>hoverPause: true,<?php endif; ?>
pause: 1000
});
});
</script>


Hasta ahí todo perfecto, el error desapareció, el problema viene cuando navego por las diferentes secciones del menú principal que es donde reaparece el error, y no se por qué motivo. Reviso los html que genera y no se carga ningún script que necesite jQuery, tan sólo el menú que se arrastra por todas las secciones de la web pero se supone que no es jQuery. Alguien sabe por qué me pasa esto?

Os dejo el script del menú:

<!--Starting Suckerfish Script-->
<?php if($this->params->get('showSuckerfish') == 1) : ?>
<script type="text/javascript"><!--//--><![CDATA[//><!--
startList = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("nav");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="span") {
node.onmouseover=function() {
this.className+=" over";
}
node.onmouseout=function() {
this.className=this.className.replace(" over", "");
}
}
}
}
}
window.onload=startList;

//--><!]]>
</script>



Gracias y un saludo