equal
deleted
inserted
replaced
544 position = document.body.scrollTop; |
544 position = document.body.scrollTop; |
545 } |
545 } |
546 return position; |
546 return position; |
547 } |
547 } |
548 |
548 |
|
549 function getXScrollOffset(el) |
|
550 { |
|
551 var position; |
|
552 var s = el || self; |
|
553 el = el || document; |
|
554 if ( el.scrollTop ) |
|
555 { |
|
556 position = el.scrollLeft; |
|
557 } |
|
558 else if (s.pageYOffset) |
|
559 { |
|
560 position = self.pageXOffset; |
|
561 } |
|
562 else if (document.documentElement && document.documentElement.scrollLeft) |
|
563 { |
|
564 position = document.documentElement.scrollLeft; |
|
565 } |
|
566 else if (document.body) |
|
567 { |
|
568 position = document.body.scrollLeft; |
|
569 } |
|
570 return position; |
|
571 } |
|
572 |
549 function setScrollOffset(offset) |
573 function setScrollOffset(offset) |
550 { |
574 { |
551 window.scroll(0, offset); |
575 window.scroll(0, offset); |
552 } |
576 } |
553 |
577 |