首页 >

jQuery无刷新分页完整实例代码【jquery】

web前端|js教程jQuery无刷新分页完整实例代码【jquery】
jQuery,无刷新分页
web前端-js教程
卖场erp系统源码下载,ubuntu打开esp文件,爬虫工作面试,宜php,涿州seo公司lzw
这款jQuery分页示例,是分页经典形式,兼容性也做的好,网页上的分页代码,分享给大家。
renren 源码,ubuntu更换中文语言,tomcat广域网访问,镜像站爬虫,php刷新时间节省资源,重seolzw
运行效果截图如下:
源码 淘宝登录,vscode找编译器位置,ubuntu无法联系,tomcat 每次重启服务,爬虫和监控,php5.4空间,seo推广公司在哪里外推,土拨鼠网站源码lzw
在线演示地址如下:

http://demo.jb51.net/js/2015/jquery-wsx-page-style-demo/

具体代码如下:

jQuery分页演示效果$(document).ready(function(){ var show_per_page = 5;  var number_of_items = $('#content').children().size(); var number_of_pages = Math.ceil(number_of_items/show_per_page); $('#current_page').val(0); $('#show_per_page').val(show_per_page); var navigation_html = 'Prev'; var current_link = 0; while(number_of_pages > current_link){  navigation_html += ''+ (current_link + 1) +'';  current_link++; } navigation_html += 'Next'; $('#page_navigation').html(navigation_html); $('#page_navigation .page_link:first').addClass('active_page'); $('#content').children().css('display', 'none'); $('#content').children().slice(0, show_per_page).css('display', 'block'); });function previous(){ new_page = parseInt($('#current_page').val()) - 1; if($('.active_page').prev('.page_link').length==true){  go_to_page(new_page); }}function next(){ new_page = parseInt($('#current_page').val()) + 1; //if there is an item after the current active link run the function if($('.active_page').next('.page_link').length==true){  go_to_page(new_page); }}function go_to_page(page_num){ var show_per_page = parseInt($('#show_per_page').val()); start_from = page_num * show_per_page; end_on = start_from + show_per_page; $('#content').children().css('display', 'none').slice(start_from, end_on).css('display', 'block'); $('.page_link[longdesc=' + page_num +']').addClass('active_page').siblings('.active_page').removeClass('active_page'); $('#current_page').val(page_num);}#page_navigation a{ padding:3px; border:1px solid gray; margin:2px; color:black; text-decoration:none}.active_page{ background:darkblue; color:white !important;}   

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Vestibulum consectetur ipsum sit amet urna euismod imperdiet aliquam urna laoreet.

Curabitur a ipsum ut elit porttitor egestas non vitae libero.

Pellentesque ac sem ac sem tincidunt euismod.

Duis hendrerit purus vitae nibh tincidunt bibendum.

Nullam in nisi sit amet velit placerat laoreet.

Vestibulum posuere ligula non dolor semper vel facilisis orci ultrices.

Donec tincidunt lorem et dolor fringilla ut bibendum lacus fringilla.

In non eros eu lacus vestibulum sodales.

Duis ultrices metus sit amet sem adipiscing sit amet blandit orci convallis.

Proin ullamcorper est vitae lorem mollis bibendum.

Maecenas congue fringilla enim, tristique laoreet tortor adipiscing eget.

Duis imperdiet metus et lorem venenatis nec porta libero porttitor.

Maecenas lacinia lectus ac nulla commodo lacinia.

Maecenas quis massa nisl, sed aliquet tortor.

Quisque porttitor tellus ut ligula mattis luctus.

In at mi dolor, at consectetur risus.

Etiam id erat ut lorem fringilla dictum.

Curabitur sagittis dolor ac nisi interdum sed posuere tellus commodo.

Pellentesque quis magna vitae quam malesuada aliquet.

Curabitur tempus tellus quis orci egestas condimentum.

Maecenas laoreet eros ac orci adipiscing pharetra.

Nunc non mauris eu nibh tincidunt iaculis.

Ut semper leo lacinia purus hendrerit facilisis.

Praesent et eros lacinia massa sollicitudin consequat.

Proin non mauris in sem iaculis iaculis vel sed diam.

Nunc quis quam pulvinar nibh volutpat aliquet eget in ante.

In ultricies dui id libero pretium ullamcorper.

Morbi laoreet metus vitae ipsum lobortis ultrices.

Donec venenatis egestas arcu, quis eleifend erat tempus ullamcorper.

Morbi nec leo non enim mollis adipiscing sed et dolor.

Cras non tellus enim, vel mollis diam.

Phasellus luctus quam id ligula commodo eu fringilla est cursus.

Ut luctus augue tortor, in volutpat enim.

Cras bibendum ante sed erat pharetra sodales.

Donec sollicitudin enim eu mi suscipit luctus posuere eros imperdiet.

Vestibulum mollis tortor quis ipsum suscipit in venenatis nulla fermentum.

Proin vehicula suscipit felis, vitae facilisis nulla bibendum ac.

Cras iaculis neque et orci suscipit id porta risus feugiat.

Suspendisse eget tellus purus, ac pulvinar enim.

Morbi hendrerit ultrices enim, ac rutrum felis commodo in.

Suspendisse sagittis mattis sem, sit amet faucibus nisl fermentum vitae.

Nulla sed purus et tellus convallis scelerisque.

Nam at justo ut ante consectetur faucibus.

Proin dapibus nisi a quam interdum lobortis.

Nunc ornare nisi sed mi vehicula eu luctus mauris interdum.

Mauris auctor suscipit tellus, at sodales nisi blandit sed.



jQuery无刷新分页完整实例代码【jquery】
  • php+ajax无刷新分页实例详解【PHP】
  • php+ajax无刷新分页实例详解【PHP】 | php+ajax无刷新分页实例详解【PHP】 ...

    jQuery无刷新分页完整实例代码【jquery】
  • Jquery+JSon 无刷新分页实现代码【jquery】
  • Jquery+JSon 无刷新分页实现代码【jquery】 | Jquery+JSon 无刷新分页实现代码【jquery】 ...

    jQuery无刷新分页完整实例代码【jquery】
  • jQuery 无刷新分页实例代码【jquery】
  • jQuery 无刷新分页实例代码【jquery】 | jQuery 无刷新分页实例代码【jquery】 ...