i can't get this through.
I need to get offset().top from a jquery object, this is my code
parentLi = $(element).parents("li");
parentLiOffset = parentLi.offset();
top = parentLiOffset.top;
left = parentLiOffset.left;
console.log(parentLiOffset);
console.log(top);
console.log(left);
And this is what console gives back:
Object { top=208, left=311}
Window /demo/
311
as you can see, I can't manage to get the "top" value. I'm usinf firefox, if that makes any difference.
Thanks!
var parentLi = $( element ).closest( 'li' );