我试图开始使用jQuery插件jqGrid,但是它给了我一个错误-- "b.jgrid.jqID不是一个函数“。我从http://www.trirand.com/blog/?page_id=6下载了这个插件,其中包含了所有的特性,并且引用了jquery.jqGrid.min.js和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 });
});
https://stackoverflow.com/questions/5970600
复制相似问题