The problem is simple. How do I get a div’s background image size (width and height) in jQuery. Is it even possible? I thought this would work:
jQuery('#myDiv').css('background-image').height();
The error message I get is that this is not a function.
You’ll have to do something like this:
Due to the simplicity of the code, you cannot use parenthesis or quotation marks in the URLs of your background images. However, the code could be extended for greater support. I just wanted to convey the general idea.