linear

[« IE6: grrrrr] [Main Index] [100 posts »]

gecko-ized

02/07/2002

I finally made the flying menu work under gecko (Netscape 6 and Mozilla). Some goofy NaN bugs were impeding my progress, but I've coded around that noise, and the changes are in linearlib.js if you want to take a peek.

I still haven't geckoized the theme picker, but that's next I suppose.

Here's the code for you intrepid readers: (I had to mangle the f*nction keyword to avoid b0rking your browser)


f*nction smoothMove() {
// sniff sniff, what's that smell?
var ns4 = document.layers ? 1 : 0;
var ie = document.all ? 1 : 0;
var gecko = document.getElementById && !document.all ? 1 : 0;

if (ie){
var where = document.all.navBar.offsetTop;
var Dif = parseInt((document.body.scrollTop + topOffset - where)*.1);
document.all.navBar.style.pixelTop += Dif;
}
if (gecko) {
var where = parseInt(document.getElementById('navBar').style.top);
if (isNaN(where)) where = 0;
var Dif = parseInt((window.pageYOffset + topOffset - where)*.1);
if (isNaN(Dif)) Dif = 0;
document.getElementById('navBar').style.top = where + Dif;
}
}


text, scripts and images copyright © 2001-2011 . All rights reserved.