resize() function in jQuery?resize() Method attaches window element to an event handler function and this event handler function executes when the resize event occurs.resize() Method Syntax :$(window).resize(function(){
//code that executes when the resize event occurs.
});