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

Uncaught ReferenceError: total is not defined #363

Open
FabiolaDErcole opened this issue Mar 26, 2021 · 1 comment
Open

Uncaught ReferenceError: total is not defined #363

FabiolaDErcole opened this issue Mar 26, 2021 · 1 comment

Comments

@FabiolaDErcole
Copy link

I get this error

Uncaught ReferenceError: total is not defined
    at s.fn.init.e.fn.onepage_scroll (jquery.onepage-scroll.min.js?ver=1.0.186:1)
    at onepage.js?ver=1.0.186:3
    at onepage.js?ver=1.0.186:15

And it gets me to this function

     $.fn.onepage_scroll = function(options){
    var settings = $.extend({}, defaults, options),
        el = $(this),
        sections = $(settings.sectionContainer)
        total = sections.length,
        status = "off",
        topPos = 0,
        leftPos = 0,
        lastAnimation = 0,
        quietPeriod = 500,
        paginationList = "";
        ...

What should I do?

@wiratana
Copy link

wiratana commented May 8, 2021

you dont give a commas , , after sections = $(settings.sectionContainer), that's why total is not defined.

        el = $(this),
        sections = $(settings.sectionContainer)    <----- add a commas in here
        total = sections.length,

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

No branches or pull requests

2 participants