使用2个JQuery版本
问题描述:
我是Themeforest的作者,今天我收到了Envato的消息,告诉我必须使用最新版本的jQuery来获得我的html模板的批准,但是当我使用最新版本时摄像头(http://www.pixedelic.com/plugins/camera/)消失。 我能做什么? 请我需要帮助 感谢使用2个JQuery版本
答
您可以使用$.noConflict(true)
<script src="other_lib.js"></script>
<script src="jquery.js"></script>
<script>
$.noConflict();
jQuery(document).ready(function($) {
// Code that uses jQuery's $ can follow here.
});
// Code that uses other library's $ can follow here.
</script>
关于jQuery的noConflict();
欲了解更多信息,请参阅THIS
'jQuery的noConflict()'。 –
在jQuery Migrate中使用最新的jQuery版本;) –