Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable pagination #14

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

treyhunner
Copy link

This allows pagination links to be temporarily disabled by setting the 'disabled' data value to true on the pagination container. This ability is useful when pagination events require visual transitions that should not be interrupted by changing pages again.

@gbirke
Copy link
Owner

gbirke commented Oct 4, 2011

Nice idea! If you could write the use case in the docs, I will merge this pull request.

@treyhunner
Copy link
Author

I added a usage example just below the other docs I added. It's based on the first usage example.

By the way, the first usage example is buggy:

for(var i=new_page_id;i<;i++) {

I think this should instead be:

for(var i=new_page_id;i<20;i++) {

I can also add a demo if that would be useful. A demo can easily be made from the demo.htm file by modifying pageselectCallback. Here's an example.

        function pageselectCallback(page_index, jq){
            var new_content = jQuery('#hiddenresult div.result:eq('+page_index+')').clone();
            $("#Pagination").data('disabled', true);
            $('#Searchresult').hide().empty().append(new_content).show(1000, function(){
                $("#Pagination").data('disabled', false);
            });
            return false;
        }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants