Powered by Blogger.

CSS position (top, left) in percentage


Get top in %
$(element).position().top / $(element).parent().height() * 100
Get left in %
$(element).position().left / $(element).parent().width() * 100

No comments