nivo slider and lightbox conflict jquery

核能气质少年 提交于 2019-12-12 03:29:23

问题


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> 

回答1:


Try this:

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



回答2:


just to say I had the same problem.

Plugins:

  • jQuery Lightbox For Native Galleries
  • Nivo Slider for WordPress

I made it work by removing line 32:

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>

from nivoslider4wp-shop.php located in the \plugins\nivo-slider-for-wordpress\

I hope that helps.



来源:https://stackoverflow.com/questions/15681198/nivo-slider-and-lightbox-conflict-jquery

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!