限制jQuery的WordPress的引导程序 [英] conflit jquery wordpress bootstrap
本文介绍了限制jQuery的WordPress的引导程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用Bootstrap进入WordPress主题,并且wp-include文件夹中的jQuery与我的主题jQuery之间存在冲突
I am using bootstrap into a WordPress theme and I have a conflict between jQuery in wp-include folder and my theme jQuery
这是我需要bootstrap.min.js和jquery.js的函数jQuery
this is my function jQuery that need bootstrap.min.js and jquery.js
jQuery(function($) {'use strict',
//#main-slider
$(function(){
$('#main-slider.carousel').carousel({
interval: 8000
});
});
});
我该如何解决这个问题?
how could I resolve this problem ?
推荐答案
一种脚本的最简单方法是:
The easiest way for one script is:
(function($){
$(function()){
//yours code
});
}(jQuery));
这篇关于限制jQuery的WordPress的引导程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文