jquery resize () method syntax
Role: When adjusting the size of the browser window, resize events. resize () method triggers the resize event, or specified when the function when the resize event. Marble platform production plant
Trigger resize event syntax: $ (Selector) .resize ()
The binding function to resize event syntax: $ (Selector) .resize (function)
parameter:
parameter | description |
function | Optional. Provisions when the function when resize event. |
jquery resize () method of Example
<HTML> <head> <Script type = "text / JavaScript" the src = "http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"> </ Script> <Script type = "text / JavaScript"> X = 0; $ (Document) .ready (function () { $ (window) .resize (function () { $ ( "span") text (X + =. 1);. }); }); </ Script> </ head> <body> <P> the window size is adjusted <span> 0 </ span> times. </ the p-> <the p-> try to re-adjust the size of the browser window. </ P> </ body> </ HTML>