Good art is a taste, good design is an opinion.


Come as guest, stay as family.
Board Index

Come as guest, stay as family.


You are not connected. Please login or register

Foto

[Javascript] Fancy pagination style



View previous topic View next topic Go down Message [Page 1 of 1]

1
Offline

  Shadow

Shadow
Administrator
Administrator

[Javascript] Fancy pagination style Alerte10

Tutorial: Fancy pagination style

Get a fancy pagination style for your forum.

Credits: @HeroWaar


--> Tutorials, tips and tricks <--
Fancy pagination style



- Javascript
Placement In the sub-forum

Code:
[panda=js]$(function(){
     
    $('head').append('<style>.paging a, .paging b {text-decoration:none;background-color: #e9e9e9;border: 1px solid #afafaf;border-radius: 3px;box-shadow: 1px 1px 1px #ddd;color: #717171 !important;padding: 5px 8px;cursor: default;}.paging a:hover {background: #fff;}.paging b {background: #fff;border-color: #ccc;box-shadow: 0 0 5px #ccc inset;}.paging .disabled {background: #eee !important;border-color: #ccc !important;box-shadow: none;color: #999 !important;cursor: not-allowed;}</style>');
    var sPages = jQuery('.paging');
    if (sPages.length) {
      sPages.html(sPages
        .html()
        .replace(/<\/a> :/g, '<\/a> ')
        .replace(/<\/a>, <b>/g, '</a> <b>')
        .replace(/>,.<a/g, '> <a')
      );
    };
        var ante = jQuery('.paging .sprite-arrow_prosilver_left').length;
        var prox = jQuery('.paging .sprite-arrow_prosilver_right').length;
        if (ante && prox )  {
            jQuery('.paging .sprite-arrow_prosilver_right').replaceWith('<span title="Go to the next page.">Next »</span>');
            jQuery('.paging .sprite-arrow_prosilver_left').replaceWith('<span title="Go to the previous page.">« Previous</span>');
        } else if (ante) {
            jQuery('.paging').append('<a class="disabled" title="Go to the next page." style="margin-left: 5px;">Next »</a>');
            jQuery('.paging .sprite-arrow_prosilver_left').replaceWith('<span title="Go to the previous page.">« Previous</span>');
        } else if (prox) {
            jQuery('.paging a:first').after('<a class="disabled" title="Go to the next page.">« Previous</a>');
            jQuery('.paging .sprite-arrow_prosilver_right').replaceWith('<span title="Ir para a próxima página.">Next »</span>');
        }
    $('.paging a:first').remove();
    });


- Preview
[Javascript] Fancy pagination style W2NzZaU




© PunBB Design


[Javascript] Fancy pagination style Act_bottom If you have any questions related to this topic create a topic with the following title:
Fancy pagination style

Powered by PunBB
Currently 0 users have thanked Shadow for this post:

2
Offline

  Dragon 2

Dragon 2
Punbb Rookie
Punbb Rookie
Very Happy Very Happy Very Happy Very Happy

Powered by PunBB
Currently 0 users have thanked Dragon 2 for this post:

3
Offline

  sayedn95

sayedn95
Newbie
Newbie
لاىرىرىرررررررررررررر

Powered by PunBB
Currently 0 users have thanked sayedn95 for this post:

4
Offline

  Sponsored content



Powered by PunBB
Currently 0 users have thanked Sponsored content for this post:

View previous topic View next topic Back to top Message [Page 1 of 1]


Topic URL's

URL
BBcode
HTML

Permissions in this forum:
You cannot reply to topics in this forum