The page then has several events that dynamically increase the DOM element, such as clicking on a layer to list the details below, so that there is no problem with FF and Chrome, but it is ie6-8 every time under the sun.
For example, I drag a layer, in the middle of the drag process is displayed at the bottom of the layer, when I release the layers of this layer will jump back to the position before the drag ...
At first I didn't see it was a heavy layout ... Then demonstrated n long, struggled for n long, finally feel that may be due to the dynamic increase in the DOM node caused by the trigger window.resize and make the page layout ...
In the end I shouted in the heart of "Thank godness ...", it is OK to change the height of the window on the page layout has no effect, or really want to trouble dead ...
Copy Code code as follows:
Bindresizewindow:function () {
var obj = this;
$ (window). Resize (function () {
var newwidth = $ (window). width ();
if (newwidth = = obj.windowwidth) {return;}
Obj.initui ();
Obj.createui ();
Obj.windowwidth = Newwidth;
});
},
The only way to trigger a heavy-layout event is to only change the width of the binding method.