jqgrid 错误 - b.jgrid.jqID 不是函数 [英] jqgrid error - b.jgrid.jqID is not a function
本文介绍了jqgrid 错误 - b.jgrid.jqID 不是函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试开始使用 jQuery 插件 jqGrid,但是它给了我错误 - b.jgrid.jqID 不是函数".我从 http://www.trirand.com/blog/?page_id=6 下载了所有插件包含的功能并引用 jquery.jqGrid.min.js 和 grid.locale-en.js.
I'm trying to get started with the jQuery plugin, jqGrid, however it's giving me the error - "b.jgrid.jqID is not a function". I downloaded the plugin from http://www.trirand.com/blog/?page_id=6 with all features included and am referencing both jquery.jqGrid.min.js and grid.locale-en.js.
这里是html:
<table id="list"></table>
<div id="pager"></div>
这里是js:
jQuery(function () {
jQuery("#list").jqGrid({
url: '/admin/campus/getnearbybusinesses',
datatype: "json",
colNames: ['Name', 'Location'],
colModel: [
{ name: 'Name', index: 'Name', width: 150 },
{ name: 'Location', index: 'Location', width: 150 }
],
rowNum: 10,
rowList: [10, 20, 30],
pager: '#pager',
sortname: 'Name',
viewrecords: true,
sortorder: "asc",
caption: "Businesses"
});
jQuery("#list").jqGrid('navGrid', '#pager', { edit: false, add: false, del: false });
});
推荐答案
请尝试包含i18n/grid.locale-en.js"在jquery.jqGrid.src.js"之前
Please try to include "i18n/grid.locale-en.js" before "jquery.jqGrid.src.js"
这篇关于jqgrid 错误 - b.jgrid.jqID 不是函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文