Показать сообщение отдельно
  #6 (permalink)  
Старый 05.05.2009, 14:17
Аватар для e1f
e1f e1f вне форума
Профессор
Отправить личное сообщение для e1f Посмотреть профиль Найти все сообщения от e1f
 
Регистрация: 03.04.2009
Сообщений: 1,263

В Лисе работает. На таком наборе:
<script type="text/javascript">
<!--
function chsz(xobj, id, w, h, speed){
    var t1, t2;
    var obj=document.getElementById(id);
    var n=x=Number(obj.offsetWidth), m=y=Number(obj.offsetHeight);

    t1 = setInterval(function(){
        if(n<w){
            n+=5;
            obj.style.width=n+'px'
        }
        if(m<h){
            m+=5;
            obj.style.height=m+'px'
        }
        if(n>=w&&m>=h){
            clearInterval(t1)
        }
    }, speed);
    xobj.onmouseover=function(){
        clearInterval(t2);
        t2=null;
        if (!t1) t1 = setInterval(function(){
            if(n<w){
                n+=5;
                obj.style.width=n+'px'
            }
            if(m<h){
                m+=5;
                obj.style.height=m+'px'
            }
            if(n>=w&&m>=h) clearInterval(t1)
        }, speed);
    };
    xobj.onmouseout=function (){
        clearInterval(t1);
        t1=null;
        if (!t2) t2=setInterval(function(){
            if(n>x){
                n-=5;
                obj.style.width=n+'px'
            }
            if(m>y){
                m-=5;
                obj.style.height=m+'px'
            }
            if(n<=x&&m<=y) clearInterval(t2)
        }, speed);
    };
    return
}
-->
</script>
</head>
<body>
<table><tr>
<td id="libcell" style="border:1px solid red" onmouseover="chsz(this,'descrlib','100','100','1') ">..........</td></tr></table>
<div id="descrlib" style="width:10px;height:10px;border:1px solid green"></div>
</body>
</html>
Ответить с цитированием