Skip to content
This repository has been archived by the owner on Jan 2, 2021. It is now read-only.

Set an option without triggering the paged event #20

Merged
merged 1 commit into from Jul 26, 2013

Conversation

m-hume
Copy link
Contributor

@m-hume m-hume commented May 25, 2013

Usage:
.jqPagination('option', {key: value[, key: value][, trigger: true|false ]})

Legacy operation is maintained but now you can set multiple properties with one call and specify if you want the paged trigger to fire

the following sets the max pages to 10 and the current page to 5 whilst not triggering paged
.jqPagination('option', {
max_page: 10,
current_page: 5,
trigger: false
});

Usage:
.jqPagination('option', {key: value[, key: value][, trigger: true|false ]})

Legacy operation is maintained but now you can set multiple properties with one call and specify if you want the paged trigger to fire

the following sets the max pages to 10 and the current page to 5 whilst not triggering paged 
.jqPagination('option', {
    max_page: 10,
    current_page: 5,
    trigger: false
});
// if set_page property is set call setPage
if(options.set_page !== undefined){
result = base.setPage(options.set_page, prevent_paged);
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

set_page should actually read current_page
oops

lines 331 and 332

@beneverard beneverard merged commit ad2991d into beneverard:master Jul 26, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants