davist11/jQuery-One-Page-Nav — Issue #6: Uncaught TypeError: Cannot read property 'top' of null
Author: saltcod
Created: 2011-11-18 17:46:52+00:00
State: open

Hi Trevor,

I've been using and loving your plugin. But I stumbled across an issue earlier today. I can't even point to anything I did—the ScrollTop still works, jQuery still loads, but your plugin calls an UncaughtType Error. Just out of the blue.

I can make the error go away by adding a +1 to line 65—don't know why that happens....
topPos = (divPos +1).top;

I'm probably just going to start from scratch, but I wonder if its something I did or if its an error.

Full Error Text:

Uncaught TypeError: Cannot read property 'top' of null
$.fn.onePageNav.onePageNav.getPositionsjquery.nav.js:65
e.extend.eachjquery.min.js:2
e.fn.e.eachjquery.min.js:2
$.fn.onePageNav.onePageNav.getPositionsjquery.nav.js:62
$.fn.onePageNav.onePageNav.initjquery.nav.js:102
$.fn.onePageNavjquery.nav.js:120
e.extend.eachjquery.min.js:2
e.fn.e.eachjquery.min.js:2
$.fn.onePageNavjquery.nav.js:116
(anonymous function)

And error screenshot: http://cl.ly/2d3A0j15372p3e1G4325