In jQuery you can get the top position relative to the parent as a number, but you can not get the css top value as a number if it was set in px. Say I have th
px
A jQuery plugin based on M4N's answer
jQuery.fn.cssNumber = function(prop){ var v = parseInt(this.css(prop),10); return isNaN(v) ? 0 : v; };
So then you just use this method to get number values
$("#logo").cssNumber("top")