jquery.min.js冲突 [英] jquery.min.js Conflicts
本文介绍了jquery.min.js冲突的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我添加以下脚本时,它会影响项目的其他功能(Spring应用程序)
When I add the below script ,it effecting other functionality of the project(Spring Application)
<script type="text/javascript" src="${ctx}/js/jquery-1.3.2.min.js"></script>
我的代码
<script type="text/javascript" src="${ctx}/js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="${ctx}/js/easy.notification.js"></script>
<script type="text/javascript">
$.noConflict();
$(function() {
$("input[type='text']").blur(function() {
if (this.value === '') {
$.easyNotificationEmpty('Warning : You left this field empty !');
} else {
$.easyNotification('Saved Successfully !');
}
})
});
</script>
我怀疑是因为jquery-1.3.2.min.js
我尝试过$.noConflict();
,但没有得到想要的结果.
I have tried $.noConflict();
, but am not getting desired results.
请帮助我解决此问题, 预先感谢.
Please help me to resolve this problem, Thanks in advance.
推荐答案
尝试一下,
jQuery(function($) {
$("input[type='text']").blur(function() {
if (this.value === '') {
$.easyNotificationEmpty('Warning : You left this field empty !');
} else {
$.easyNotification('Saved Successfully !');
}
})
});
这篇关于jquery.min.js冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文