auxiliary / rpage Goto Github PK
View Code? Open in Web Editor NEWHighly responsive pagination for Bootstrap
Home Page: http://auxiliary.github.io/rpage
License: GNU General Public License v2.0
Highly responsive pagination for Bootstrap
Home Page: http://auxiliary.github.io/rpage
License: GNU General Public License v2.0
By li elements without inner span the function outerWidth() returns in chrome the value NaN. So the calculation of the width fails. I inserted if statement to check if the li-elements conatins a span element:
this.calculateWidth = function() { var width = 0; for (var i = 0; i < $container.find("li").length; i++) { if ($container.find("li").eq(i).children("a").length) { width += $container.find("li").eq(i).children("a").eq(0).outerWidth(); } else { width += $container.find("li").eq(i).children("span").eq(0).outerWidth(); } } return width; }
Hey man, can you please add a package.json
It's not an issue, it's just an idea. But maybe it'll be difficult to implement. The idea is to make hidden pages accessible by clicking on "..."
In case if parent container have padding, we need to work out available space in it. So rather this:
this.makeResponsive = function() {
...
while (width > this.els.parent().parent().outerWidth() - 10)
It should be this:
this.makeResponsive = function() {
...
while (width > this.els.parent().parent().width() - 10)
The plugin doesn't account for jQuery no-conflict configuration, and thus failing when trying to access the $ alias when jQuery is running in no-conflict mode.
The plugin code should be wrapped by (function ($) { ... }(jQuery));
, ;(function ($, window, undefined) { ... })(jQuery, this);
, or any other variant.
http://learn.jquery.com/plugins/basic-plugin-creation/#protecting-the-alias-and-adding-scope
Didn't work properly in chrome, with many pages.
edited the function calculateWidth. Now it's working correctly.
this.calculateWidth = function() { var width = 0; for (var i = 0; i < $container.find("li").length; i++) { if(!($container.find("li").eq(i).css('display') == 'none')) { width += $container.find("li").eq(i).children("a").eq(0).outerWidth(); width += $container.find("li").eq(i).children("span").eq(0).outerWidth(); } } return width; }
Hi! Great project, I like it and use it in a project already.
For another project I have the need to lock an element from being removed. Background is, I want to create a pagination for scrolling through football-matchdays of a league. One of the matchdays COULD be the actual day - today. No problem to highlight this day, but it must not be removed/hidden from the pagination at any circumstances.
I have tried to add this to the isRemovable function:
if (element.hasClass('pagination-lock'))
{
return false;
}
It basically works, but under certain circumstances "..." are placed incorrectly.
Any chance to add this feature? Would be a great enhancement!
Thank you!
mothe
If the paginator is not visible initially, for instance is placed in another tab, it looks too narrow.
I really like the idea behind this project and I would like to use it on my websites, but I am struggling with one huge downside. The pagination takes couple of seconds to redraw when I change the size of its container (or browser). As you can imagine, no one should have something that slow on their website. Have anyone noticed this issue? Is there a way to speed it up?
Hello, thanks for your plugin. I found a problem when too much pages about ~250 plugin freezes page for 5-10 seconds...maybe you know how to fix it? Thanks
Thanks for making this! It looks really neat.
But would you upgrade the code for Bootstrap 4 also?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.