Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/73.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 引导分页不工作_Jquery_Twitter Bootstrap - Fatal编程技术网

Jquery 引导分页不工作

Jquery 引导分页不工作,jquery,twitter-bootstrap,Jquery,Twitter Bootstrap,引导分页不起作用。我在pager的文本框中没有看到第#页,它在jquery.tablesorter.pager.js函数moveToFirstPage ln#33(即table.config)中抛出错误。table.config不可用 代码如下所示: <table cellspacing="1" class="tablesorter"> <thead> <tr> <th>col1</th

引导分页不起作用。我在pager的文本框中没有看到第#页,它在jquery.tablesorter.pager.js函数moveToFirstPage ln#33(即table.config)中抛出错误。table.config不可用

代码如下所示:

    <table cellspacing="1" class="tablesorter">
    <thead>
        <tr>
            <th>col1</th>
            <th>col2</th> 
        </tr>
    </thead>
         <tbody>
        <tr>
            <td>val1</td>
            <td>val2</td>
                  </tr>
          </tbody>
    </table>
<div id="pager" class="pager" style="position:absolute;width:100%;background-color:#8F8F8F;color:White;">
        <form>
            <img src="@Url.Content("~/Content/images/first.png")" class="first"/>
            <img src="@Url.Content("~/Content/images/prev.png")" class="prev"/>
            <input type="text" class="pagedisplay" readonly="readonly" style="width:auto" />
            <img src="@Url.Content("~/Content/images/next.png")" class="next"/>
            <img src="@Url.Content("~/Content/images/last.png")" class="last"/>
            Show <select class="pagesize" style="width:auto;">
                <option selected="selected"  value="10">10</option>
                <option value="20">20</option>
                <option value="30">30</option>
                <option  value="40">40</option>
            </select> items
        </form></div>

缺少什么?

您缺少的一件大事是使桌子本身成为桌子分拣机。只要在
tablesorterpage
之前调用
tablesorter
就可以了

$("table").tablesorter().tablesorterPager({ container: $("#pager") }); $(“table”).tablesorter().tablesorterPager({container:$(“#pager”)});
顺便说一句,您的表行和寻呼机选项需要正确设置。

是的,我以前调用过它,并在jquery.tablesorter.min.js$(“table”).tablesorter({}).tablesorterPager({container:$(“#pager”)})上抛出配置错误;你有没有包括js文件。错误是什么?您使用的是哪个jquery版本?它在jquery.tablesorter.min.js的ln#539处抛出错误。错误为“Microsoft JScript运行时错误:'this.config.debug'为null或不是对象”Jquery 1.8.3版。你能提供更多关于“你的表行和寻呼机选项需要正确设置”的信息吗?我甚至看到将代码从$(“表”).tablesorter({})更改为$(“表”).tablesorter()的错误。tablesorter()更新:我从这里获取了tablesorter.js:我的版本是2.7.3(由2.0代替)。现在我在ln#332“Microsoft JScript运行时错误:'0.length'为null或不是对象”中看到错误 $("table").tablesorter().tablesorterPager({ container: $("#pager") });