我使用jquery分页插件进行分页......如果有一个分页插件,对我来说没有问题......但是如果有两个似乎是工作,但对方似乎并没有太...这里是我的代码,在同一页面中的两个jquery分页插件似乎没有工作
<div id="PagerUp" class="pager">
</div><br /><br /><br />
<div id="ResultsDiv">
</div>
<div id="PagerDown" class="pager">
</div>
我的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>
下面是我收到...
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">
</script>
<script type="text/javascript">
$(document).ready(function() {
$(".pager").pagination(300, { callback: pagecallback,
current_page: 0,
items_per_page: 5,
num_display_entries: 5,
next_text: 'Next',
prev_text: 'Prev',
num_edge_entries: 1
});
});
function pagecallback() {
var paginationClone = $("#Pagination > *").clone(true);
$("#Pagination2").empty();
paginationClone.appendTo("#Pagination2");
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<div class="pager" id="pagination">
<!-- the container for your first pagination area -->
</div>
<div id="results">
<!-- the container where you show your results -->
</div>
<div class="pager" id="Pagination2">
<!-- the container for your second pagination area -->
</div>
</div>
</form>
</body>
</html>
@mef它似乎不适合我... – 2010-04-12 11:55:36
@Pandiya Chendur:这绝对有效。仔细检查身份证等... – Leo 2010-04-12 11:59:22
@Mef看看我编辑的部分我的问题,这就是我使用的... – 2010-04-12 12:18:53