Kkpager improvements, AJAX data changes but the page number does not change the problem, Kkpagerajax

Source: Internet
Author: User

Most recent projects have used Kkpager to do pagination, and there is no problem when a page is called only once, but there is a problem when a page is called multiple times.

Collected on the internet for a long time, and finally found a solution, recorded to facilitate later use. Hope also can be convenient for the friends who need!

Kkpager is a simple pagination display plugin that needs to rely on jquery.


: Http://www.oschina.net/action/project/go?id=29450&p=download
Official Document Address: Https://github.com/pgkk/kkpager

Online Testing Links:
Blue Skin: http://pgkk.github.io/kkpager/example/pager_test.html
Orange skin: http://pgkk.github.io/kkpager/example/pager_test_orange_color.html

Click mode: http://pgkk.github.io/kkpager/example/pager_test_clickmode.html

Problems that exist:

In the Ajax refresh dynamic into the page number, regardless of changing the page number, is to display the first page number

Workaround:

The original invocation method:

Modify JS:, add "true" at the end, in order to reload config configuration

In fact, it is possible to solve the problem just mentioned here.

There is another workaround:

1. Modify the generated control code for Kkpaper.js:

1.1) The original code

1.2) The modified code

Call Method:

Effect:

Kkpager improvements, AJAX data changes but the page number does not change the problem, Kkpagerajax

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.