| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| NamePros Member Join Date: Jan 2005
Posts: 97
![]() | JS Scroll detecting Cross browser I am use the following javascript code to detect the scroll movement in various browsers. Mostly IE and FF since those are the only two I got. Code: function getScrollMovement(){
if (typeof(pageXOffset) != "undefined")
{
currentX=window.pageXOffset;
currentY=window.pageYOffset;
}
else if (document.compatMode == "CSS1Compat" )
{
currentX=document.documentElement.scrollLeft
currentY=document.documentElement.scrollTop
}
else
{
currentX=document.body.scrollLeft
currentY=document.body.scrollTop
}
}
__________________ AEInbetween |
| |