开发者

how to design jQuery based pagination

开发者 https://www.devze.com 2023-02-08 01:46 出处:网络
I would like to create a pagination function in jQuery, my code as follows: <ul class=\"pagination\">

I would like to create a pagination function in jQuery, my code as follows:

<ul class="pagination">
    <li class="">1</li>
    <li class="inactive">2</li>
    <li><a id="qp3" class="apager" href="/3">3</a></li>
    <li><a id="qp4" class="apager" href="/4">4</a></li>
    <li><a id="qp5"开发者_StackOverflow class="apager" href="/5">5</a></li>
    <li><a id="nqp2" class="apager" href="/2">next</a></li>
</ul>

When someone clicks a link, I would like to show which link they have clicked on and remove the class .inactive - the Anchor tag should be removed also.

How can I copy the Anchor into every <li>?

[edited by Neuroflux, apologies if I got the question wrong...]


You should check out the jQuery website, they have many articles like this one and this one to help you out with your problem. :)

They have demonstrations to show you how they work and guidelines for installation.


Try this , this plugin is good. This is looking similar to the control used in stackoverflow paging

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号