

We can combine all the events using jQuery on method.

When we use jQuery then we can use jQuery wrapper methods to fire those events.įollowing are different ways of executing a function on load, resize and scroll events: The load event The resize event is sent to the window element when the size of the browser window changes: 1. on ('resize', handler) in the first and second variations, and. (B3) Set the image source, start loading the image. resize () This signature does not accept any arguments.
(B2) When the image is fully loaded, we calculate the new dimensions and draw the resized version onto the