Ver Mensaje Individual
  #4 (permalink)  
Antiguo 04/04/2012, 09:53
javislim
 
Fecha de Ingreso: septiembre-2008
Mensajes: 70
Antigüedad: 15 años, 7 meses
Puntos: 0
Respuesta: Conflicto mootols / colorbox/ StartStop-Slide

Bueno la verdad es que desde el día que me había dado el error y estuve dedicándole bastante tiempo no lo había mirado más, acabo de solucionarlo, el tema esta en el uso de la función jQuery.noConflict(); , el startstop-slider.js lo copie al archivo en vez de incluirlo y ahí también utilice jQuery.noConflict(); al igual que en colorbox y lo referente a mootols como siempre, dejo aquí el código funcional por si alguien le intereza, y agradezco a Takehiko por la respuesta.


Cita:
<script src="colorbox/jquery.min.js"></script>
<script src="colorbox/jquery.colorbox.js"></script>

<script type="text/javascript">
// SET THIS VARIABLE FOR DELAY, 1000 = 1 SECOND
var delayLength = 8000;

function doMove(panelWidth, tooFar) {
var leftValue = jQuery("#mover").css("left");

// Fix for IE
if (leftValue == "auto") { leftValue = 0; };

var movement = parseFloat(leftValue, 10) - panelWidth;

if (movement == tooFar) {
jQuery(".slide img").animate({
"top": -200
}, function() {
jQuery("#mover").animate({
"left": 0
}, function() {
jQuery(".slide img").animate({
"top": 20
});
});
});
}
else {
jQuery(".slide img").animate({
"top": -200
}, function() {
jQuery("#mover").animate({
"left": movement
}, function() {
jQuery(".slide img").animate({
"top": 20
});
});
});
}
}

$(function(){

var $slide1 = jQuery("#slide-1");

var panelWidth = $slide1.css("width");
var panelPaddingLeft = $slide1.css("paddingLeft");
var panelPaddingRight = $slide1.css("paddingRight");

panelWidth = parseFloat(panelWidth, 10);
panelPaddingLeft = parseFloat(panelPaddingLeft, 10);
panelPaddingRight = parseFloat(panelPaddingRight, 10);

panelWidth = panelWidth + panelPaddingLeft + panelPaddingRight;

var numPanels = jQuery(".slide").length;
var tooFar = -(panelWidth * numPanels);
var totalMoverwidth = numPanels * panelWidth;
jQuery("#mover").css("width", totalMoverwidth);

jQuery("#slider").append('<a href="#" id="slider-stopper">Stop</a>');

sliderIntervalID = setInterval(function(){
doMove(panelWidth, tooFar);
}, delayLength);

jQuery("#slider-stopper").click(function(){
if (jQuery(this).text() == "Stop") {
clearInterval(sliderIntervalID);
jQuery(this).text("Start");
}
else {
sliderIntervalID = setInterval(function(){
doMove(panelWidth, tooFar);
}, delayLength);
jQuery(this).text("Stop");
}

});

});
</script>
<script>
var $j = jQuery.noConflict();
$j(document).ready(function(){
//Examples of how to assign the ColorBox event to elements
$j(".group1").colorbox({rel:'group1'});
$j(".group2").colorbox({rel:'group2', transition:"fade"});
$j(".group3").colorbox({rel:'group3', transition:"none", width:"75%", height:"75%"});
$j(".group4").colorbox({rel:'group4', slideshow:true});
$j(".ajax").colorbox();
$j(".youtube").colorbox({iframe:true, innerWidth:425, innerHeight:344});
$j(".iframe").colorbox({iframe:true, width:"800px", height:"700px"});
$j(".inline").colorbox({inline:true, width:"50%"});
$j(".callbacks").colorbox({
onOpen:function(){ alert('onOpen: colorbox is about to open'); },
onLoad:function(){ alert('onLoad: colorbox has started to load the targeted content'); },
onComplete:function(){ alert('onComplete: colorbox has displayed the loaded content'); },
onCleanup:function(){ alert('onCleanup: colorbox has begun the close process'); },
onClosed:function(){ alert('onClosed: colorbox has completely closed'); }
});

//Example of preserving a JavaScript event for inline calls.
$j("#click").click(function(){
$j('#click').css({"background-color":"#f00", "color":"#fff", "cursor":"inherit"}).text("Open this window again and this message will still be here.");
return false;
});
});

</script>
<!-- ACABA LO REFERENTE A COLORBOX-->

<script src="js/mootools-core-1.4-full.js" type="text/javascript"></script>
<script src="js/mootools-more-1.4-full.js" type="text/javascript"></script>
<script type="text/javascript">
window.addEvent('domready', function(){
new Fx.Accordion($('accordion'), '#accordion h2', '#accordion .content');
});
</script>