The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Waypoint find next div Reply To: Waypoint find next div


Well you’ve got a scoping problem I’d say.

Declaring var next =... inside a function sticks it into the scope of said function. That means it can’t be accessed outside of the function it was declared.

What I’d do is return the value of next in the function so it can be passed as an object to another.