Results 1 to 2 of 2

Thread: loading <div>

  1. #1
    Join Date
    Dec 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default loading <div>

    im not sure how it works but, i was wondering how does the "loading" icon can be displayed on screen on a certain position even when you scoll down or up?
    i found that gmail has that, but when i use the script the loading icon does not follow the scroll and stays in the same position. any help?
    Last edited by Disaster-sama; 12-05-2006 at 08:44 PM.

  2. #2
    Join Date
    Dec 2005
    Location
    Moscow, Russia
    Posts
    39
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    This script corrects position when scrolling window. Attach it to layer with "loading".

    Code:
    <script>d=document;g=function(X){return d.getElementById(X);}
    d1top=200;d1left=120;
    onscroll=function(){g('d1').style.top=d1top+d.body.scrollTop;g('d1').style.left=d1left+d.body.scrollLeft;}
    if(self.addEventListener)addEventListener('DOMMouseScroll',function(){setTimeout(onscroll,1)},!1);
    (genBr5x=function(N){while(N)d.write(N--+'<br><br><br><br><br>');}
    )(20)
    </script> 
    <div id=d1 style="position:absolute;top:200px;left:120px;border:1px solid red">Floating div</div>
    </body></html>

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •