I\'m trying to get an element\'s CSS (top and left) with jQuery:
$(element).css(\'top\');
but instead of \"12%\" like it should be, I get the p
You can do this:
$(element).position().top / $(element).parent().height() * 100
Regarding your precedent comment, if you want to work with css('top'), don't forget to parseInt it.