I’ve got the following error appearing in the Dev Console and stalling all further code execution.
The element selector function (usually $w) cannot be used before the page is ready
(see image)
I cannot find the resolution for this error. It’s on the Trip Planner 2 page.
Any help much appreciated.
It’s on my
Adventure Sail site:
https://www.adventuresail.ca/planner
or on the menu at
Booking… > Trip Planner 2
Any suggestions much appreciated!
From one Tony to another, you likely have some code referencing an element ($w) outside of a function somewhere in your code page. It’s trying to execute, but the page has not loaded yet. That code needs to be inside of a function, perhaps the onReady function for your page.
Thanks Tony. I’ll check for that (once I get back to my office) - Tony :o)
Back now and checked. All reference to “$w” are inside functions… any other ideas appreciated.
Tony, maybe a screen shot of the top portion of your code page, including the onReady function, would help one of us identify the cause of the issue.
Here you go Tony. Thanks for checking it… HOLD IT !
I checked thru all 500+ lines of code and found a misplaced closing brace (“}”) which rendered a $w call outside a function (just as you said).
ALL GOOD NOW… ISSUE RESOLVED.