Jump to content

Opera Stick to Top Problem


Howdy_McGee

Recommended Posts

So I have a problem in Opera. When you scroll down my rightside navigation starts to slow creep up the screen. It happens just when you hit the stick to top categories. So i'm thinking it has something to do with it. I'm using Mootools and the following script

window.onscroll = function(){	if( window.XMLHttpRequest )		  {		if (document.documentElement.scrollTop > 760 || self.pageYOffset > 760) {						$('categories-5').style.position = 'fixed';			$('categories-5').style.top = '0';		} else if (document.documentElement.scrollTop < 760 || self.pageYOffset < 760) {						$('categories-5').style.position = 'absolute';			$('categories-5').style.top = '760px';		}		if (document.documentElement.scrollTop > 760 || self.pageYOffset > 760) {						$('recent-comments-3').style.position = 'fixed';			$('recent-comments-3').style.top = '265px';		} else if (document.documentElement.scrollTop < 1025 || self.pageYOffset < 1025) {						$('recent-comments-3').style.position = 'absolute';			$('recent-comments-3').style.top = '1025px';		}	}}

I'm thinking it's when the self.pageYOffset sets in that the right nav messes up. Anyone know hot to fix or have any suggestions?- To check it for yourself www.trileafdesigns.com/blog/

Link to comment
Share on other sites

I don't see anything that would cause it to "creep". But what does the window.XMLHttpRequest have anything to do with it? That's for ajax. I'll see if I can get a copy of opera for linux and try it.Edit: Ok I see what you are saying but the problem is happening for the right navigation, not the categories. It chunks up a notch when I hit that scroll point.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...