equal
deleted
inserted
replaced
|
1 function getScrollOffset() |
|
2 { |
|
3 var position; |
|
4 if (self.pageYOffset) |
|
5 { |
|
6 position = self.pageYOffset; |
|
7 } |
|
8 else if (document.documentElement && document.documentElement.scrollTop) |
|
9 { |
|
10 position = document.documentElement.scrollTop; |
|
11 } |
|
12 else if (document.body) |
|
13 { |
|
14 position = document.body.scrollTop; |
|
15 } |
|
16 return position; |
|
17 } |
|
18 |
|
19 var fix_scroll = function() |
|
20 { |
|
21 var div = document.getElementById('playbar'); |
|
22 div.style.top = ( String(getScrollOffset()) ) + 'px'; |
|
23 } |
|
24 |
|
25 window.onscroll = fix_scroll; |
|
26 |