jQuery Event - resize() Method
Example
Count the resize of the browser window:
$$(window).resize(function() { $('span').text(x+=1); });
Definition and Usage
The resize event occurs when the browser window size is adjusted.
The resize() method triggers the resize event or specifies a function to be executed when the resize event occurs.
Binds a function to the resize event
Syntax
$(selector).resize(function)
Parameters | Description |
---|---|
function | Optional. Specifies a function to be executed when the resize event occurs. |