Here, I'm resizing a div. A callback function is used to resize the image within the div.




Similar to the one above, but this one preserves aspect ratio.