Retrieve size of background image after scaling with jQuery?
<p>I have the following simple code to get me the background-image dimensions, but it grabs the size of the original image, not the scaled one I have in my div. I want to get pixel dimensions after scaling, is there any way to do that?</p>

<pre><code>var actualImage = new Image();
actualImage.src = $("#chBox").css('background-image').replace(/"/g, "").replace(/url\(|\)$/ig, "");
actualImage.onload = function () {
    width = this.width;
    height = this.height;
}
</code></pre>

<p>EDIT:</p>

<p>The CSS to scale the background-image:</p>

<pre><code>#chBox {
height:100%;
width:100%;
background-repeat:no-repeat;

background-image: url(../content/frog/1.jpg);
background-position: center;
    -webkit-background-size: contain; /*for webKit*/
    -moz-background-size: contain; /*Mozilla*/
    -o-background-size: contain; /*opera*/
    background-size: contain; /*generic*/

}
</code></pre>
