我相信這兩個Jquery之間存在衝突。我的jquery版本是:1.8.2。兩個代碼之間的jquery衝突讓我瘋狂
<script type="text/javascript">
jQuery(document).ready(function($) {
var portfolioCarousel = $("#widget-portfolio-2");
portfolioCarousel.carouFredSel({
width : "100%",
height : "auto",
circular : false,
responsive : true,
infinite : false,
auto : false,
items : {
width : 280,
visible: {
max: 1
}
},
scroll : {
wipe : true
},
prev : {
button : "#widget-portfolio-2-prev",
key : "left"
},
next : {
button : "#widget-portfolio-2-next",
key : "right"
},
onCreate : function() {
$(window).on('resize', function(){
portfolioCarousel.parent().add(portfolioCarousel).css('height', portfolioCarousel.children().first().outerHeight() + 'px');
}).trigger('resize');
}
});
});
這一個:
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery('#example2').showbizpro({
dragAndScroll:"off",
visibleElementsArray:[5,4,3,1],
carousel:"on",
heightOffsetBottom:10,
mediaMaxHeight:[150,150,150,150],
rewindFromEnd:"off",
autoPlay:"off",
delay:2000,
speed:750
});
// THE FANCYBOX PLUGIN INITALISATION
jQuery(".fancybox").fancybox();
});
</script>
第二個完美的作品。第一個不是。
我希望有人解決這個問題。
你能看到問題嗎? 謝謝你在前進,
Cruxy
沒有工作使用這樣的事情。問題是一樣的 –
控制檯上顯示的錯誤是什麼? (如果有錯誤) –
1消息被過濾器隱藏。顯示所有訊息。 Uncaught TypeError:Object [object Object] has no method'fancybox'kledingpakket.php:1030 event.returnValue已棄用。請改用標準的event.preventDefault()。 Uncaught ReferenceError:siblingsFader未定義 –