Skip to content
This repository has been archived by the owner on Aug 15, 2019. It is now read-only.

nextpage function - curpage variable #3

Open
mcamacho opened this issue Dec 22, 2011 · 1 comment
Open

nextpage function - curpage variable #3

mcamacho opened this issue Dec 22, 2011 · 1 comment

Comments

@mcamacho
Copy link

In the nextpage function, I found a line of code that is causing an issue when submiting the form from the last page.
The curpage variable (that is currently a int. var.) receives the object array settings.pages.
After this the navigation stops working.

if (curpage > settings.pages.length) {
// submit!
$(this).submit();
curpage = settings.pages;
return false;
}

@BDuell
Copy link

BDuell commented May 24, 2012

Just changing the "curpage = settings.pages;" to "curpage = settings.pages.length;" (and adding a "curpage = page;" right before the "return false;" at the end of the "jQuery.fn.gotopage" function did the trick for me.

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

No branches or pull requests

2 participants