标签: jquery-pagination

阿贾克斯与Kaminari宝石的分页

最近的一次railscast之后,我在我的网站上使用了kaminari gem,我想做ajax分页

kaminari文件说: the helper supports Rails 3 unobtrusive Ajax.

有没有人有关于如何做到这一点的任何提示或教程?我正在使用jquery,rails 3等.我想我的application.js文件需要一些内容来监听分页导航中的按钮

如果有人需要代码,我会发布它

jquery pagination ruby-on-rails jquery-pagination ruby-on-rails-3

27
推荐指数
1
解决办法
2万
查看次数

如何使用SimplePagination jquery

我想在我的代码上使用simplePagination.(我正在使用MVC4 C#开发)

假设我有这堆代码

<table>
    <thead>
        <tr>
            <td><input type="checkbox" name="select-all" id="select-all" /></td>
            <td style="text-align: left">Name</td>
            <td style="text-align: left">Created By</td>
            <td style="text-align: left">Created Date</td>
        </tr>
    </thead>
    <tbody>
        <tr class="post">
            <td><p><input Length="0" name="314" type="checkbox" value="true" /><input name="314" type="hidden" value="false" /></p></td>
            <td>Window</td>
            <td>John</td>
            <td>01/01/2014 12:00:00 AM</td>
        </tr>
        <tr class="post">
            <td><p><input Length="0" name="314" type="checkbox" value="true" /><input name="314" type="hidden" value="false" /></p></td>
            <td>Door</td>
            <td>Chris</td>
            <td>01/01/2014 12:00:00 AM</td>
        </tr>
        <tr class="post">
            <td><p><input Length="0" name="314" type="checkbox" value="true" /><input name="314" type="hidden" value="false" /></p></td>
            <td>Floor</td>
            <td>Michael</td>
            <td>01/01/2014 12:00:00 AM</td> …
Run Code Online (Sandbox Code Playgroud)

html javascript jquery jquery-pagination

18
推荐指数
1
解决办法
8万
查看次数

重置jquery分页插件中的总页数

我正在使用TwbsPagination插件在我的应用程序中显示分页.我们在初始化时设置页面大小时工作正常.但是,根据搜索结果,我想重置总页数.

当我尝试使用时

$('#pagination').twbsPagination({totalPages:10});
Run Code Online (Sandbox Code Playgroud)

它没有重置显示的总页数.

jquery reset jquery-pagination

14
推荐指数
3
解决办法
1万
查看次数

分页替代品

我正在寻找分页选择的想法.我知道2个分页方案:

必须有其他一些不太知名/流行的方法来做到这一点.如果您可以提供演示链接,则可获得奖励积分

谢谢

html javascript jquery pagination jquery-pagination

12
推荐指数
1
解决办法
3550
查看次数

jQuery分页插件

希望这是一个容易补救的东西.我在理解jQuery Pagination插件时遇到了一些问题.

基本上,我要做的就是加载一个PHP文件,然后对结果进行分页.我试图摆脱他们的榜样,但我并没有屈服于我正在寻找的结果.

这是JavaScript:

 function pageselectCallback(page_index, jq){
            var new_content = $('#hiddenresult div.result:eq('+page_index+')').clone();
            $('#Searchresult').empty().append(new_content);
            return false;
        }
        function initPagination() {
            var num_entries = $('#hiddenresult div.result').length;
            // Create pagination element
            $("#Pagination").pagination(num_entries, {
                num_edge_entries: 2,
                num_display_entries: 8,
                callback: pageselectCallback,
                items_per_page:3
            });
         }      
        $(document).ready(function(){      
            $('#hiddenresult').load('load.php', null, initPagination);
        });      
Run Code Online (Sandbox Code Playgroud)

这是我的HTML(加载PHP之后):

        <div id="Pagination" class="pagination"> </div>
        <br style="clear:both;" />
        <div id="Searchresult"> </div>

       <div id="hiddenresult" style="display:none;"> 
         <div class="result">Result #1</div>
         <div class="result">Result #2</div>
         <div class="result">Result #3</div>
         <div class="result">Result #4</div>
         <div class="result">Result #5</div>
         <div class="result">Result #6</div>
         <div class="result">Result …
Run Code Online (Sandbox Code Playgroud)

javascript jquery pagination jquery-pagination

8
推荐指数
1
解决办法
2万
查看次数

同一页面中的两个jquery分页插件似乎不起作用

我使用jquery分页插件进行分页...如果有一个分页插件对我没有问题...但如果有两个似乎工作但另一个似乎也没有...这是我的代码,

<div id="PagerUp" class="pager">

</div><br /><br /><br />
    <div id="ResultsDiv">

</div>
<div id="PagerDown" class="pager">

</div>
Run Code Online (Sandbox Code Playgroud)

我的jquery有,

<script type="text/javascript">
         var itemsPerPage = 5;
         $(document).ready(function() {
             getRecordspage(0, itemsPerPage);
             var maxvalues = $("#HfId").val();
             $(".pager").pagination(maxvalues, {
                 callback: getRecordspage,
                 current_page: 0,
                 items_per_page: itemsPerPage,
                 num_display_entries: 5,
                 next_text: 'Next',
                 prev_text: 'Prev',
                 num_edge_entries: 1
             });
         });

</script>
Run Code Online (Sandbox Code Playgroud)

这是我得到的......

alt text http://img52.imageshack.us/img52/5618/pagerse.jpg

两者都有效,但看看pagerup所选页面3只是PagerDown显示1....如何在jquery中更改其他寻呼机上的一个寻呼机回调事件....

编辑: 使用mef的想法似乎不起作用......

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script type="text/javascript" src="jquery.js"></script>
    <link rel="Stylesheet" type="text/css" href="CSS/Main.css" />
      <script type="text/javascript" src="Javascript/jquery.pagination.js"> …
Run Code Online (Sandbox Code Playgroud)

jquery plugins pagination jquery-pagination

5
推荐指数
1
解决办法
5169
查看次数

如何在Struts 2中实现分页

如何在Struts 2中实现客户端显示的分页和Hibernate作为持久层.

这是我到目前为止所做的代码:

<display:table id="students" name="students" pagesize="2"
    export="false" requestURI="/student">
    <display:column property="studentRoll" title="Roll"
        paramId="studentRoll" sortable="true" />
    <display:column property="studentName" title="Name" sortable="true" />
    <display:column property="studentCourse" title="Course"
        sortable="true" />
    <display:setProperty name="paging.banner.placement" value="bottom" />
</display:table>
Run Code Online (Sandbox Code Playgroud)

有没有办法在没有display标签的情况下实现这个?

java jsp struts2 jquery-pagination struts2-jquery

5
推荐指数
1
解决办法
9429
查看次数

为什么分页点不显示?

我正在使用jquery.pagination.js插件.

我有100页.第一页和最后一页是数字显示,但没有显示点.请检查屏幕截图和代码.

$("#Pagination").pagination(num_entries, {
    items_per_page : 10,
    num_display_entries : 2,
    num_edge_entries : 1,
    current_page : pageIndex-1,
    //link_to : path +"?"+param
    callback : paginationCallback
});

function paginationCallback(page_index, jq) {

}
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述 在此输入图像描述

是否有用于显示点符号的默认选项?

javascript jquery jquery-pagination

5
推荐指数
1
解决办法
1277
查看次数

Jquery中的动态分页

我有这个代码:

//Pagination
	pageSize = 8;

	showPage = function(page) {
	    $(".line-content").hide();
	    $(".line-content").each(function(n) {
	        if (n >= pageSize * (page - 1) && n < pageSize * page)
	            $(this).show();
	    });        
	}
    
	showPage(1);

	$("#pagin li a").click(function() {
	    $("#pagin li a").removeClass("current");
	    $(this).addClass("current");
	    showPage(parseInt($(this).text())) 
	});
Run Code Online (Sandbox Code Playgroud)
.current {
  color: green;
}

#pagin li {
  display: inline-block;
}
Run Code Online (Sandbox Code Playgroud)
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<div class="line-content">1 I have some content</div>
<div class="line-content">2 I have some content</div>
<div class="line-content">3 I have some content</div>
<div class="line-content">4 I have some content</div>
<div class="line-content">5 I …
Run Code Online (Sandbox Code Playgroud)

javascript jquery pagination jquery-pagination

5
推荐指数
2
解决办法
3万
查看次数

如何使用jqPagination

请帮帮我,我不知道如何使用jqPagination(http://beneverard.github.com/jqPagination/).我希望每个页面都有其他内容.例如,第1页,内容是段落,第2页是其他段落.我不想点击显示/隐藏来显示内容.

谢谢!

jquery pagination jquery-pagination jqpagination

3
推荐指数
1
解决办法
8104
查看次数

使用datatable jquery在每页下拉列表中添加更多选项

我一直在使用datatable jquery(http://datatables.net/)插件.

一切都运行正常,但现在我希望能够选择多于每页记录的默认选项,默认情况下我可以选择10,25,50,100.我想在此列表中添加15和30.

我怎么能这样做,我在网上搜索但找不到任何答案.

谢谢

datatables jquery-pagination jquery-datatables

3
推荐指数
1
解决办法
7548
查看次数

Isotope Pagination with load more

I used the isotope from the site http://isotope.metafizzy.co/ and implemented a method to use load more items by pressing a button. The problem is that when i hide the elements to display only the initial number of elements, my isotope grid won't scale. If i press the show more button, the layout accurately scales.

It seems that

  $grid.isotope('hideItemElements', $(this)).isotope('layout');
Run Code Online (Sandbox Code Playgroud)

but

 $grid.isotope('revealItemElements', $(this)).isotope('layout');
Run Code Online (Sandbox Code Playgroud)

效果很好。你能告诉我我在做什么错吗?

这是Codepan中的一个演示:http ://codepen.io/laura-chesches/pen/RKPWGo

jquery jquery-pagination jquery-isotope isotope

2
推荐指数
1
解决办法
3921
查看次数

jQuery 无需插件即可轻松分页

所以,我的问题如下。遵循之前的HEREHERE

我使用以下代码从 XML 动态添加了表:

$.ajax({
    type: "GET",
    url: "../datas/_pizzas",
    dataType: "xml",
    success: function(xml) {
        $(xml).find('row').each(function() {
            var getNom = $(this).find('nomp').text();
            var Prix1 = $(this).find('petit').text();
            var Prix2 = $(this).find('moyen').text();
            var Prix3 = $(this).find('grand').text();
            $('<table id="item"></table>').html('<tr><td id="test" onclick="afficher(\''+getNom +'\','+Prix1+','+Prix2+','+Prix3+');"><b>' + getNom + '</b></td></tr>').appendTo('#pizzas');
        });
    }
});
Run Code Online (Sandbox Code Playgroud)

我需要限制页面上的数量。如果可能的话,有一个索引导航。我正在寻找一个可以解决问题的分页插件,但我还没有找到任何适合我的,太多无用的配置,或者对我来说不可读。

有人有代码或帮我解释一下吗???

jquery pagination jquery-plugins jquery-pagination

-2
推荐指数
1
解决办法
6941
查看次数