move()+update()
От: cgibin  
Дата: 17.10.08 23:25
Оценка:
Почему-то если позвать move() элемента(position:fixed), а потом update(), то его fixed позиционирование игнорируется. Если же передвигать через стиль + update(), то всё ОК.


<html>

<style>

.rect { 
    position:fixed;
    left:100;
    top:100;
    width:100;
    height:100;
    background-color:blue;
}

</style>

<script type="text/tiscript">

    function $(selector)
    {
        return ( typeof selector == #symbol)?
          self.select("#%s",selector):
          self.select(selector); 
    }    
    $(#move0).onClick = function(){  $(#rect).move(300,100); $(#rect).update();  }
    $(#move1).onClick = function(){  $(#rect).style#left = "300px"; $(#rect).update(); }

</script>


<body>

<input type="button" id="move0" value="Move by move()">
<input type="button" id="move1" value="Move by style">
<div class="rect" id="rect">Hello</div>
</body>
</html>
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.