jQuery resize not working at FireFox, Chrome and Safari

后端 未结 8 1282
刺人心
刺人心 2020-12-03 11:30
$(\"#dvMyDIV\").bind(\"resize\", function(){
    alert(\"Resized\");
});

or

$(\"#dvMyDIV\").resize(function(){
    alert(\"Resized\         


        
相关标签:
8条回答
  • 2020-12-03 12:05

    It is not the question WHY? It is Demanded, as in, we WANT to monitor a DIV when it is resized.

    For obvious example, jQuery UI, resizable. Yeah, user resized a div by mouse drag, now what? Maybe the content inside is resized and we want to know about it. And should we have all the code in a giant melting pot within the original reszing code? I don't think so.

    Another speedy browser that does nothing, sigh.

    0 讨论(0)
  • 2020-12-03 12:09

    Here is a much more refined and a live example that does a lot of resize math all based on the window resize event. Works brilliantly in ff 3.6, safari 4.0.4, and chrome. It is a little chunky in ff 3.5. So thus it should work in mozilla and webkit across the boards. I avoid the other BROWSER, because I really do not like it, and the code is so much cleaner without having to consider it. I realize that I will have to get over that, I swallow it when I have to with and IE surcharge.

    ANYWAY the link:

    http://fridaydev.com/bookmap/proport3.html

    0 讨论(0)
提交回复
热议问题