listens for window scaling events to construct the size for the current object. jquery provides a resize event that binds a handler function in each of the resize events of a matching element, such as resizing, aligning, and so on, triggering when the document window changes size
There are two kinds of listening methods, one is the browser window monitoring, one is the object scaling of monitoring (by clicking on the status bar's zoom scale implementation)
For the monitoring of Windows:
<span>$ (window). Resize (function () { Resizer ($ (this)); Do sonrthing });
</span>
Listener for object scaling:
<span>$ ("#ObjId"). Resize (function () { Resizer ($ (this)); Do sonrthing });</span>
This way, when encapsulating some jquery plug-ins, you can properly consider two kinds of event monitoring, so that we do the plug-in has a better user experience.
Binding Resizer Events
<span>$ (window). Bind (' Resize ', function () {var leftposition = inactiveb.position (). LEFT;INACTIVE.CSS (" Position "," absolute "); Inactive.css (" left ", Leftposition);}); </span>
jquery Event-resize () method