Search code examples
jquerylightboxnivo-slider

nivo slider and lightbox conflict jquery


Can anybody help me with this jquery function. I know it is a conflict with both, but i dont know what i must change.

It works both allown on the page. But toghter the lightbox doesn´t work.

Lightbox

<script src="js/prototype.js" type="text/javascript"></script>
<script src="js/scriptaculous.js?load=effects,builder" type="text/javascript"></script>
<script src="js/lightbox.js" type="text/javascript"></script>

Nivo slider

<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="slider/jquery.nivo.slider.js"></script>
<script type="text/javascript">
$(window).load(function() {
$('#slider').nivoSlider({
    effect:'fade',
    slices:10,
    animSpeed:1500,
    pauseTime:10000,
    directionNav:true, //Next & Prev
    directionNavHide:true, //Only show on hover
    controlNav:true, //1,2,3...
    keyboardNav:true, //Use left & right arrows
    pauseOnHover:true, //Stop animation while hovering
    manualAdvance:false, //Force manual transitions
    captionOpacity:0.8, //Universal caption opacity
    beforeChange: function(){},
    afterChange: function(){},
    slideshowEnd: function(){} //Triggers after all slides have been shown
    });
  });
 </script> 

Solution

  • Try this:

    <script type="text/javascript">
    var j = jQuery.noConflict();
    j(window).load(function() {
      j('#slider').nivoSlider({