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

Boundary case: js error in case of one page. #11

Open
sikka opened this issue Aug 19, 2014 · 0 comments
Open

Boundary case: js error in case of one page. #11

sikka opened this issue Aug 19, 2014 · 0 comments

Comments

@sikka
Copy link

sikka commented Aug 19, 2014

In case there is only one page, there is a js error at line 78 in jquery.multipage.js as settings.pages[page] is not defined in this case.
Fix:

       if (page==1) {
            // set up for first page
            $(id + '_nav .multipage_back').hide();
            $(id + '_nav .multipage_next').show();
            if (settings.pages.length != 1 && settings.pages[page].title) {
                $(id + '_nav .multipage_next').html('Next: ' + settings.pages[page].title);
            } else if (settings.pages.length == 1){
                $(id + '_nav .multipage_next').addClass('submit');
                $(id + '_nav .multipage_next').html('Submit');
            } else {
                $(id + '_nav .multipage_next').html('Next');
            }

        }
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

1 participant