It took one day to implement a pager navigation page-a la
child .
I didn’t go far into the forest, but decided to find out what kind of animal it was that had been excavated on many sites, but it turned out that it was the
brainchild of karaboz . And even there is
an analogue , altered under jQuery.
But each version has, as it seemed to me, a huge drawback, ignoring the mouse wheel. “But it would be more convenient with this!” I exclaimed and decided to rewrite a little so that the pager scrolled to the mousewheel event. And also there are other disadvantages that I cover under the cut.
No sooner said than done.
See
an example .
Download the revised
version (not dependent on jQuery).
Picture for clarity:

')
Mode of application:
paginator_example = new Paginator(
"paginator_example", // id ,
2048, //
10, // ,
300, //
"http://www.yourwebsite.com/pages/". // url «page-%page%.html», %page%
false // , true,
);
Disadvantages :
1. jQuery versionBinding and dependence on jQuery, and also does not work on a click on the scrollbar. But they have a bunch of "buns" in the form of additional parameters - the function being called instead of following the URL, the reverse order of output.
2. Original versionThe lack of the above described "buns", but they do not interfere with life.
I hope, tomatoes for such a rash step do not shower me. Moreover, the author of the jQuery version
promised to hang this event, but I probably did not find the time.
It would be great if this pager shows up on a child - it’s impossible to get through to the mailbox.
Or if I get the coveted invite for children.Ps . If the jQuery version “buns” will be in demand for you, write - I will bring them.
UPD : updated the js-file code, for compliance with the current version of dirty.ru - easier and with handlers "ctrl + →" and "ctrl + ←".
UPD : added the ability to reverse page output.