I'm console.logging the offset()
of an element and I get
left: 1236
top: 139
__proto__: Object
But when I log offset().top
I get the error
Cannot read property 'top' of null
Here's my code in its entirety:
console.log(('.index-title').eq(n).prev().offset().top);