jquery中两个JS冲突is not a function解决

2016-03-05   点击:   发布者:南京互诺科技
owlCarousel is not a function

将页面中$ 自定义$j 避免冲突 如下:

<script type="text/javascript">
var $j = jQuery.noConflict();
$j(function(){
$j('#owl-demo').owlCarousel({
items: 1,
navigation: true,
navigationText: ["上一个","下一个"],
autoPlay: true,
stopOnHover: true
}).hover(function(){
$j('.owl-buttons').show();
}, function(){
$j('.owl-buttons').hide();
});
});
</script>
window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"1","bdSize":"16"},"share":{},"image":{"viewList":["qzone","tsina","tqq","renren","weixin"],"viewText":"分享到:","viewSize":"16"},"selectShare":{"bdContainerClass":null,"bdSelectMiniList":["qzone","tsina","tqq","renren","weixin"]}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];

相关阅读