jquery-pagination | 轻量易用、可自定义化的jquery分页插件 DEMO | Learning library
kandi X-RAY | jquery-pagination Summary
kandi X-RAY | jquery-pagination Summary
轻量易用、可自定义化的jquery分页插件^ ^ DEMO→
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of jquery-pagination
jquery-pagination Key Features
jquery-pagination Examples and Code Snippets
Community Discussions
Trending Discussions on jquery-pagination
QUESTION
This is regarding the following jQuery Pagination code: https://github.com/gbirke/jquery_pagination/blob/master/src/jquery.pagination.js
Made some customisations to the original code already, with this is a related post regarding the changes made.
Here is the updated code now: https://jsfiddle.net/a6gx5z2o/13/
...ANSWER
Answered 2017-Jul-02 at 18:35It is a bit much to dump the entire plugin code into your question and expect someone to search through it and try to find all of the modifications you have made. I am certainly not prepared to do it.
However, I want to point out a few problems with your approach:
First, you should not be modifying the plugin source directly. In my original answer to you, I made sure to leave the plugin code intact and explicitly overwrote the $.PaginationCalculator.prototype.getInterval
implementation outside of the plugin code. Anyone picking-up your code is not going to know that this plugin code has been modified and will be very confused when the behavior does not comply with the documentation.
Secondly, you should not be hard-coding 7
s all over the place. This plugin code was intentionally designed to support different configurations. By hard-coding in 7
, you have ensured that this code will break for anyone who initializes the plugin with a num_display_entries
that is not 7
.
Thirdly (and similar to the second point), you should not be modifying the default options within the plugin code. The plugin design allows you to pass, for example, your own values for prev_text
and next_text
at initialization.
Although I would not attempt to debug your modifications, I did take a look at original plugin source to see if your new requirement could be met. I believe I was able to meet your requirement by changing just a single line of code. I simply changed the default link text that is set in the $.PaginationRenderers.defaultRenderer.prototype.createLink
method. Again, in order to preserve the plugin source, I would recommend explicitly overwriting the method you want to modify. I have copied the method and have added a comment regarding the line of code I have changed:
QUESTION
I copied and made my page according to this link: link to css pagination and here is my html markup according to instructions:
...ANSWER
Answered 2017-Apr-09 at 15:57Syntax error edges:2.
. Learn to use developers tool
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install jquery-pagination
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page