TypeError:$(...)。jqGrid不是函数 [英] TypeError: $(...).jqGrid is not a function
本文介绍了TypeError:$(...)。jqGrid不是函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
i有问题 TypeError:$(...)。jqGrid不是函数 ....
i search一些关于解决方案的所有解决方案都是相同的,即加载js文件的更改顺序。
i更改也是但错误仍然存在...
我的订单在下面。 ...
包含文件
< script src = 〜/ js / jquery-2.0.3.min。 js > < / script >
< script src = 〜/ js / jquery-1.9.0.min.js > < / 脚本 >
< script src = 〜/ js / bootstrap.min.js > < / script >
< script src = 〜/ jquery-ui-1.11 .4.custom / jQuery的-ui-1.11.4.custom / jquery-ui.min.js > < / script >
< script src = 〜/ js / i18n / grid.locale-en .js > < / script >
< ; script src < span class =code-keyword> = 〜/ js / jquery.jqGrid.min.js > 跨度> <温泉n class =code-keyword>< / script >
< link href = 〜/ Content / bootstrap.min.css rel = stylesheet / >
< link href = 〜/ jquery-ui-1.11.4.custom / jquery-ui-1.11.4.custom / jqGrid.bootstrap.css rel = 样式表 / >
< link rel = stylesheet type = text / css media = screen href = http://theme.stepofweb.com/Epona/v1.2/HTML /assets/plugins/jqgrid/css/ui.jqgrid.css\" / >
< link < span class =code-attribute> rel = stylesheet type = text / css media = screen href = http://theme.stepofweb.com/Epona /v1.2/HTML/assets/css/layout-jqgrid.css\" / >
< link href = 〜/ jquery-ui-1.11.4.custom / jquery-ui-1.11.4.custom / jquery-ui.css rel = stylesheet / >
脚本代码是
< script type = text / javascript>
var editOption = {
// width:400,height:290,left:20,top:30,
reloadAfterSubmit: false ,
jqModal: false ,
editCaption: 编辑记录,
bSubmit: 提交,
bCancel: 取消,
closeAfterEdit: true ,
mtype: POST,
editurl :' / Supplier / SaveProduct /'
};
var addOption = {
width: 400 ,身高: 290 ,左: 20 ,top: 30 ,
reloadAfterSubmit: false ,jqModal: false ,addCaption: 添加记录,
bSubmit: 提交,bCancel: 取消,
closeAfterAdd: true ,
mtype: PUT,
url:' http:// localhost:50570 / api /测试/'
};
var delOption = {
caption: 删除,
msg: 删除所选记录(s )?,
bSubmit: 删除,bCancel: 取消,
mtype: DELETE,
url:' http :// localhost:50570 / api / Test /'
};
$( document )。ready( function (){
$( #supplierList)。jqGrid({
url: ' / Supplier / SupplierListGridData /',
datatype:' json',
mtype:' POST',
colNames:[' Action' ,' 供应商名称',' < span class =code-string> Country',' Email',' 办公室电话号码'],
c olModel:[
{name:' SupplierName',index:' SupplierName',align:' left',可排序: true ,可编辑: false ,搜索: true ,stype:' text',searchoptions: {sopt:[' eq',' ne']}},
{name:' Country,搜索: true ,index:' Country',align:' left',sortable: true ,可编辑: true },
{name:' 电子邮件',索引:' Email',align:' left',sortable:< span class =code-keyword> true ,可编辑: true },
{name:' OfficeMainPhoneNumber',index:' OfficeMainPhoneNumber',对齐:' left',sortable: true ,可编辑: true },
{name:' ContactMobile。',index:' ContactMobile',对齐:' left',可排序: true ,可编辑: true } ,
],
寻呼机:$(' #supplierPager'),
rowNum: 100 ,
rowList:[ 100 , 150 , 200 ],
sortname:' SupplierName',
sortorder: desc,
viewrecords: true ,
autowidth: true ,
height:' 100%',
scrollOffset: 0 ,
shrinkToFit: true ,
gridview: true ,
loadOnce: true ,
editurl:' / Supplier / SaveProduct /',
cellEdit: true ,
add: true ,
标题: ' 供应商',rownumbers: true
})。jqGrid(' navGrid', ' #supplierPager',{
search: true ,del: true ,添加: true ,编辑: true ,
addtext: 添加记录,
edittext: 编辑记录,
deltext: 删除记录,
},editOption,
addOption,
delOption);
jQuery( #supplierList)。jqGrid( ' filterToolbar',{defaultSearch: true ,stringResult: true });
});
< / script>
请提供加载js更正订单的建议文件或解决方案...
谢谢。
解决方案
(...)。jqGrid是不是函数 ....
i搜索关于解决方案的所有解决方案都是相同的,即加载js文件的更改顺序。
i change也是错误仍然存在...
我的订单低于....
包含文件
< script src = 〜/ js / jquery-2.0.3.min.js > < / script >
< script src = 〜/ js / jquery- 1.9.0.min.js > < / script >
< script src = 〜/ js / bootstrap.min.js > < / script >
< 脚本 src = 〜/ jquery-ui-1.11.4.custom / jquery-ui-1.11.4.custom / jquery-ui.min.js > < / script >
< 脚本 src = 〜/ js / i18n / grid.locale-en.js > < / script >
< script src = 〜/ js / jquery.jqGrid.min .js > < / script >
< link href = 〜/ Content / bootstrap.min.css rel = stylesheet / >
< link href = 〜/ jquery-ui-1.11.4.custom /jquery-ui-1.11.4.custom/jqGrid.bootstrap.css\" rel = 样式表 / >
< link rel = stylesheet type = text / css media = screen href = http://theme.stepofweb.com/Epona/v1.2/HTML/assets/plugins/jqgrid/css/ui.jqgrid.css / >
< link rel = stylesheet type = text / css media = screen href = http://theme.stepofweb.com/Epona/v1.2/HTML/assets/css/layout-jqgrid.css / >
< link href = 〜/ jquery-ui-1.11.4.custom / jquery-ui-1.11.4.custom /jquery-ui.css\" rel = stylesheet / >
脚本代码
< script type = 文本/ JavaScript的跨度>>
var editOption = {
// width:400,height:290,left:20,top:30,
reloadAfterSubmit: false ,
jqModal: false ,
editCaption: 编辑记录,
bSubmit: 提交,
bCancel: 取消,
closeAfterEdit: true ,
mtype: POST,
editurl :' / Supplier / SaveProduct /'
};
var addOption = {
width: 400 ,身高: 290 ,左: 20 ,top: 30 ,
reloadAfterSubmit: false ,jqModal: false ,addCaption: 添加记录,
bSubmit: 提交,bCancel: 取消,
closeAfterAdd: true ,
mtype: PUT,
url:' http:// localhost:50570 / api /测试/'
};
var delOption = {
caption: 删除,
msg: 删除所选记录(s )?,
bSubmit: 删除,bCancel: 取消,
mtype: DELETE,
url:' http :// localhost:50570 / api / Test /'
};
( document ) .ready( function (){
( #supplierList)。jqGrid({
url:'/ Supplier / SupplierListGridData /',
datatype:' json',
mtype:' POST',
colNames:[' Action',' 供应商名称',' 国家', ' 电子邮件',' Office Phone Number'],
colModel:[
{name:' SupplierName',index:' SupplierName',align:< span class =code-string>' left',s ortable: true ,可编辑: false ,搜索: true ,stype:' text',searchoptions:{sopt:[' eq',' ne']}},
{name:' Country', search: true ,index:' Country',align:' left',sortable: true ,editable: true },
{name:' Email',index:' Email', align:' left',sortable: true ,editable: true },
{name:' OfficeMainPhoneNumber,index: OfficeMainPhoneNumber',对齐: left',sortable: true ,可编辑: true },
{name:' ContactMobile。',index:' ContactMobile',align:' left',sortable: true ,可编辑: true },
],
寻呼机:
hi,
i have the issue TypeError: $(...).jqGrid is not a function....
i search something about the solution all solution are same that is change order of loading js file.
i change that is also but the error still there...
my order is below....
File included
<script src="~/js/jquery-2.0.3.min.js"></script>
<script src="~/js/jquery-1.9.0.min.js"></script>
<script src="~/js/bootstrap.min.js"></script>
<script src="~/jquery-ui-1.11.4.custom/jquery-ui-1.11.4.custom/jquery-ui.min.js"></script>
<script src="~/js/i18n/grid.locale-en.js"></script>
<script src="~/js/jquery.jqGrid.min.js"></script>
<link href="~/Content/bootstrap.min.css" rel="stylesheet" />
<link href="~/jquery-ui-1.11.4.custom/jquery-ui-1.11.4.custom/jqGrid.bootstrap.css" rel="stylesheet" />
<link rel="stylesheet" type="text/css" media="screen" href="http://theme.stepofweb.com/Epona/v1.2/HTML/assets/plugins/jqgrid/css/ui.jqgrid.css" />
<link rel="stylesheet" type="text/css" media="screen" href="http://theme.stepofweb.com/Epona/v1.2/HTML/assets/css/layout-jqgrid.css" />
<link href="~/jquery-ui-1.11.4.custom/jquery-ui-1.11.4.custom/jquery-ui.css" rel="stylesheet" />
script code is
<script type="text/javascript">
var editOption = {
//width: 400, height: 290, left: 20, top: 30,
reloadAfterSubmit: false,
jqModal: false,
editCaption: "Edit Record",
bSubmit: "Submit",
bCancel: "Cancel",
closeAfterEdit: true,
mtype: "POST",
editurl: '/Supplier/SaveProduct/'
};
var addOption = {
width: 400, height: 290, left: 20, top: 30,
reloadAfterSubmit: false, jqModal: false, addCaption: "Add Record",
bSubmit: "Submit", bCancel: "Cancel",
closeAfterAdd: true,
mtype: "PUT",
url: 'http://localhost:50570/api/Test/'
};
var delOption = {
caption: "Delete",
msg: "Delete selected record(s)?",
bSubmit: "Delete", bCancel: "Cancel",
mtype: "DELETE",
url: 'http://localhost:50570/api/Test/'
};
$(document).ready(function () {
$("#supplierList").jqGrid({
url: '/Supplier/SupplierListGridData/',
datatype: 'json',
mtype: 'POST',
colNames: ['Action', 'Supplier Name', 'Country', 'Email', 'Office Phone Number'],
colModel: [
{ name: 'SupplierName', index: 'SupplierName', align: 'left', sortable: true, editable: false, search: true, stype: 'text', searchoptions: { sopt: ['eq', 'ne'] } },
{ name: 'Country', search: true, index: 'Country', align: 'left', sortable: true, editable: true },
{ name: 'Email', index: 'Email', align: 'left', sortable: true, editable: true },
{ name: 'OfficeMainPhoneNumber', index: 'OfficeMainPhoneNumber', align: 'left', sortable: true, editable: true },
{ name: 'ContactMobile.', index: 'ContactMobile', align: 'left', sortable: true, editable: true },
],
pager: $('#supplierPager'),
rowNum: 100,
rowList: [100, 150, 200],
sortname: 'SupplierName',
sortorder: "desc",
viewrecords: true,
autowidth: true,
height: '100%',
scrollOffset: 0,
shrinkToFit: true,
gridview: true,
loadOnce: true,
editurl: '/Supplier/SaveProduct/',
cellEdit: true,
add: true,
caption: 'Suppliers', rownumbers: true
}).jqGrid('navGrid', '#supplierPager', {
search: true, del: true, add: true, edit: true,
addtext: "Add Record",
edittext: "Edit Record",
deltext: "Delete Record",
}, editOption,
addOption,
delOption);
jQuery("#supplierList").jqGrid('filterToolbar', { defaultSearch: true, stringResult: true });
});
</script>
Please give a suggestion of correction order of loading js file or solution...
Thank you.
解决方案
(...).jqGrid is not a function....
i search something about the solution all solution are same that is change order of loading js file.
i change that is also but the error still there...
my order is below....
File included
<script src="~/js/jquery-2.0.3.min.js"></script> <script src="~/js/jquery-1.9.0.min.js"></script> <script src="~/js/bootstrap.min.js"></script> <script src="~/jquery-ui-1.11.4.custom/jquery-ui-1.11.4.custom/jquery-ui.min.js"></script> <script src="~/js/i18n/grid.locale-en.js"></script> <script src="~/js/jquery.jqGrid.min.js"></script> <link href="~/Content/bootstrap.min.css" rel="stylesheet" /> <link href="~/jquery-ui-1.11.4.custom/jquery-ui-1.11.4.custom/jqGrid.bootstrap.css" rel="stylesheet" /> <link rel="stylesheet" type="text/css" media="screen" href="http://theme.stepofweb.com/Epona/v1.2/HTML/assets/plugins/jqgrid/css/ui.jqgrid.css" /> <link rel="stylesheet" type="text/css" media="screen" href="http://theme.stepofweb.com/Epona/v1.2/HTML/assets/css/layout-jqgrid.css" /> <link href="~/jquery-ui-1.11.4.custom/jquery-ui-1.11.4.custom/jquery-ui.css" rel="stylesheet" />
script code is
<script type="text/javascript"> var editOption = { //width: 400, height: 290, left: 20, top: 30, reloadAfterSubmit: false, jqModal: false, editCaption: "Edit Record", bSubmit: "Submit", bCancel: "Cancel", closeAfterEdit: true, mtype: "POST", editurl: '/Supplier/SaveProduct/' }; var addOption = { width: 400, height: 290, left: 20, top: 30, reloadAfterSubmit: false, jqModal: false, addCaption: "Add Record", bSubmit: "Submit", bCancel: "Cancel", closeAfterAdd: true, mtype: "PUT", url: 'http://localhost:50570/api/Test/' }; var delOption = { caption: "Delete", msg: "Delete selected record(s)?", bSubmit: "Delete", bCancel: "Cancel", mtype: "DELETE", url: 'http://localhost:50570/api/Test/' };
(document).ready(function () {
("#supplierList").jqGrid({ url: '/Supplier/SupplierListGridData/', datatype: 'json', mtype: 'POST', colNames: ['Action', 'Supplier Name', 'Country', 'Email', 'Office Phone Number'], colModel: [ { name: 'SupplierName', index: 'SupplierName', align: 'left', sortable: true, editable: false, search: true, stype: 'text', searchoptions: { sopt: ['eq', 'ne'] } }, { name: 'Country', search: true, index: 'Country', align: 'left', sortable: true, editable: true }, { name: 'Email', index: 'Email', align: 'left', sortable: true, editable: true }, { name: 'OfficeMainPhoneNumber', index: 'OfficeMainPhoneNumber', align: 'left', sortable: true, editable: true }, { name: 'ContactMobile.', index: 'ContactMobile', align: 'left', sortable: true, editable: true }, ], pager:
这篇关于TypeError:$(...)。jqGrid不是函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文