BootpagjQuery 翻页插件
bootpag 是一个动态的 jQuery 翻页插件,可很好的跟 Bootstrap 和其他 HTML 页面工作。
使用方法:
<html> <head> <script src="//code.jquery.com/jquery-2.0.3.min.js"></script> <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script> <script src="//raw.github.com/botmonster/jquery-bootpag/master/lib/jquery.bootpag.min.js"></script> <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css"> </head> <body> <div id="content">Dynamic Content goes here</div> <div id="page-selection">Pagination goes here</div> <script> // init bootpag $('#page-selection').bootpag({ total: 10 }).on("page", function(event, /* page number here */ num){ $("#content").html("Insert content"); // some ajax content loading... }); </script> </body> </html>
评论