如何解决与JQuery的冲突 [英] How to solve conflict with JQuery
本文介绍了如何解决与JQuery的冲突的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是我在MasterPage中的代码:
< script src = Script / jquery-1.8.2.js 类型 = text / javascript > < / script >
< script src = Script / jquery.calendars.js <温泉n class =code-attribute> type = text / javascript > < / script >
< script src = Script / jquery.calendars.plus.js type = text / javascript > < / 脚本 >
< script src = Script / jquery.calendars.picker.js 类型 = text / javascript > < / script >
< 脚本 src = Script / jquery.calendars.picker-ar.js 类型 = text / javascript > < / script >
< script src = Script / jquery.calendars.islamic.js 类型 = text / javascript < span class =code-keyword>> < / script >
< script src = Script / jquery.calendars.islamic-ar.js type = text / javascript > < / script >
< script src = Script / jquery.calendars.validation.js 类型 = text / javascript < span class =code-keyword>> < / script >
< script src = Script / jquery.calendars.validation.min.js 类型 = text / javascript > < / script >
< script src = Script / jquery.calendars.validation.pack。 js type = text / javascript > < / script >
< script type = text / javascript >
$( function (){
$(' 。txtDate')。calendarsPicker($ .extend({showTrigger:' < span class =code-string> #calImg',日历:$ .calendars.instance( ' islamic',' ar'),constrainInput: true
}));
});
< / script >
我在网页表单页面上有另一个jQuery,但是这个下面的代码我无法在文本框中显示日历:
< ; script src < span class =code-keyword> = Script / jquery-1.3.2.min.js type = text / javascript > < / script >
< script src = Script / tableSorter.js type = text / javascript > < / script >
< script < span class =code-attribute> src = Script / jquery.tablesorter.js type = text / javascript > < / script >
< link rel = stylesheet 类型 = text / css href = themes / blue / style.css / >
< script src = Script / jquery.metadata.js type = text / javascript > < / script >
< script src = Script / jquery-latest.js 类型 = text / javascript > < / script >
< script type = text / javascript src = Script / jquery.tablesorter.js > < / script >
< script 语言 = javascript type = < span class =code-keyword> text / javascript >
$(document).ready(function(){
$(table)。tablesorter({
header:{
0:{
分拣机:假
},
6:{
分拣机:假
}
}
});
$(table)。bind(sortStart,function(){
//删除类foo
pageRow = $(这个).children(tbody)。children(tr:.foo);
$(this).children(tbody)。children(tr:.foo)。remove();
});
$(table)。bind(sortEnd,function(){
//添加删除的行
$(this).children( tbody)。append(pageRow);
});
});
< / script >
解决方案
( function (){
(' 。txtDate')。calendarsPicker(
.extend({showTrigger:' #calImg',calendar:
This is my code in the MasterPage:
<script src="Script/jquery-1.8.2.js" type="text/javascript"></script>
<script src="Script/jquery.calendars.js" type="text/javascript"></script>
<script src="Script/jquery.calendars.plus.js" type="text/javascript"></script>
<script src="Script/jquery.calendars.picker.js" type="text/javascript"></script>
<script src="Script/jquery.calendars.picker-ar.js" type="text/javascript"></script>
<script src="Script/jquery.calendars.islamic.js" type="text/javascript"></script>
<script src="Script/jquery.calendars.islamic-ar.js" type="text/javascript"></script>
<script src="Script/jquery.calendars.validation.js" type="text/javascript"></script>
<script src="Script/jquery.calendars.validation.min.js" type="text/javascript"></script>
<script src="Script/jquery.calendars.validation.pack.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$('.txtDate').calendarsPicker($.extend({ showTrigger: '#calImg', calendar: $.calendars.instance('islamic', 'ar'),constrainInput: true
}));
});
</script>
And I have another jQuery in the webform page when i but this below code i can''t show the calender in the textbox:
<script src="Script/jquery-1.3.2.min.js" type="text/javascript"> </script>
<script src="Script/tableSorter.js" type="text/javascript"> </script>
<script src="Script/jquery.tablesorter.js" type="text/javascript"> </script>
<link rel="stylesheet" type="text/css" href="themes/blue/style.css" />
<script src="Script/jquery.metadata.js" type="text/javascript"> </script>
<script src="Script/jquery-latest.js" type="text/javascript"> </script>
<script type="text/javascript" src="Script/jquery.tablesorter.js"> </script>
<script language="javascript" type="text/javascript">
$(document).ready(function () {
$("table").tablesorter({
headers: {
0: {
sorter: false
},
6: {
sorter: false
}
}
});
$("table").bind("sortStart", function () {
// remove the row with the class foo
pageRow = $(this).children("tbody").children("tr:.foo");
$(this).children("tbody").children("tr:.foo").remove();
});
$("table").bind("sortEnd", function () {
// add the removed row
$(this).children("tbody").append(pageRow);
});
});
</script>
解决方案
(function () {
('.txtDate').calendarsPicker(
.extend({ showTrigger: '#calImg', calendar:
这篇关于如何解决与JQuery的冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文