This article mainly introduces a great God wrote jquery div under the Resize event, the need for friends can refer to the following
This is the Resize event of a div under jquery written by a great God. Code as follows://resize of div (function ($, H, c) { var a = $ ([]), e = $.resize = $.extend ($.resize, {}), i, k = "SetTimeout", j = "Resize", d = j + "-special-event", B = "delay", f = "T Hrottlewindow "; e[b] = 250; e[f] = true; $.event.special[j] = { setup:function () { if (!e[f ] && This[k]) { return false; } var L = $ (The); a = A.add (l); $.data (this, D, {&nbs P W:l.width (), h:l.height () }); if (a.length = = 1) { g (); } }, On () { if (!e[f] && this[k]) { return false; } var L = $ (this); a = A.not (l); L.removedata (d); if (!a.length) { cleartimeout (i); } }, add:function (L) { if (!e[f) & amp;& This[k]) { return false; } var n; function m (s, O, p) { var q = $ (this),   R = $.data (this, d); R.W = o!== c? O:q.width (); r.h = P!== c? P:q.height (); n.apply (this, arguments); } if ($.isfunction (l)) { n = l; return m; } E LSE { n = l.handler; L.handler = m; } } }; function g () { i = H[k] (function () {& nbsp A.each (function () { var n = $ (this), m = n.width (), L = n.height (), o = $.data (this, d); if (M!== O.W | | l!== o.h) { N.trigger (j, [O.W = m, o.h = l]); } }); g (); }, e[b]); } }) (JQuery, this ; So you Can $ (' div '). Resize (Fucntion () {;.}); The