由网友(被狗追过的夏天)分享简介:有人可以帮助我使用JQuery一个简单的AJAX分页在codeigniter?从数据库queryed的分页列表。我在网上搜索,但所有的exemples是非常复杂的...谢谢你提前和对不起我的英文不好... Can someone help me with a simple AJAX pagination in C...
有人可以帮助我使用JQuery一个简单的AJAX分页在codeigniter?从数据库queryed的分页列表。 我在网上搜索,但所有的exemples是非常复杂的... 谢谢你提前和对不起我的英文不好...
Can someone help me with a simple AJAX pagination in Codeigniter using JQuery? With the paginated list queryed from the database. I searched the web but all the exemples are very complex... Thank you in advance and sorry for my bad english...
推荐答案
只需使用codeigniter分页简单,使用下列通过jquery的$ C $下分页:
just use codeigniter pagination simple and use following code for pagination through jquery:
<script>
$(function(){
$("#pagination-div-id a").click(function(){
$.ajax({
type: "POST",
url: $(this).attr("href"),
data:"q=<?php echo $searchString; ?>",
success: function(res){
$("#containerid").html(res);
}
});
return false;
});
});
</script>
下面分页的div id是分页容器containerid的ID是简单的容器的id,你显示结果。
Here pagination div id is the id of pagination container and containerid is simple the container id where you showing the result.
相关推荐
最新文章