Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/77.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery jqgrid错误-b.jgrid.jqID不是函数_Jquery_Jqgrid - Fatal编程技术网

Jquery jqgrid错误-b.jgrid.jqID不是函数

Jquery jqgrid错误-b.jgrid.jqID不是函数,jquery,jqgrid,Jquery,Jqgrid,我试图开始使用jQuery插件jqGrid,但是它给了我一个错误——“b.jgrid.jqID不是一个函数”。我从下载了插件,包含了所有功能,并引用了jquery.jqGrid.min.js和grid.locale-en.js 以下是html: <table id="list"></table> <div id="pager"></div> 请尝试包含“i18n/grid.locale en.js” 在“jQuery .jqGr.Sr.js”<

我试图开始使用jQuery插件jqGrid,但是它给了我一个错误——“b.jgrid.jqID不是一个函数”。我从下载了插件,包含了所有功能,并引用了jquery.jqGrid.min.js和grid.locale-en.js

以下是html:

<table id="list"></table>
<div id="pager"></div>
请尝试包含“i18n/grid.locale en.js”
在“jQuery .jqGr.Sr.js”

< p>我有同样的问题,所以首先需要考虑的是包含脚本的顺序(首先,您需要加载<代码> jQuery ,然后GrID.LoaLand,最后的<代码> jqGr.M.js),第二件要考虑的是多个包含<代码> JavaScript > /代码>。(在我的项目中,这就是问题所在,我在两个地方加入了
jqgrid
)。
我将它们全部删除并保留了,只有一个版本,代码开始工作。

问题是,当grid.locale-en.js需要首先引用时,我首先引用了jqgrid.js。你是我的英雄。我已经处理这个问题两个小时了,认为我的脚本中有错误。在这个answ发布8天前,我在我的评论中发布了答案呃,但我要告诉你几点:)这也有助于错误
对象没有方法jqID
。只要把它放在这里谷歌。谢谢
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 });

    });