Get the height of a background body image

http://stackoverflow.com/questions/3098404/get-the-size-of-a-css-background-image-using-javascript

 

var actualImage = new Image();
actualImage.src = $('YOUR SELECTOR HERE').css('background-image').replace(/"/g,"").replace(/url\(|\)$/ig, "");

actualImage.width // The actual image width
actualImage.height // The actual image height

Leave a Reply