Edit: This post was moved from:
http://www.dynamicdrive.com/forums/s...ad.php?t=37800
because it was unclear to me if it was an answer or a new question. I decided it was a new question, which belongs in a new thread. See above link for the code of 'your script', referred to below.
- jscheuer1
your script looks much better than mine, but I can't seem to get it to fire in ie properly....this is what I've been stuck with for awhile:
Code:
fixPos=function(o,l,t){
if(!o){
for(i in fixedPos){
fixedPos[i].style.top=(fixedPos[i].fixedTop+(document.documentElement.scrollTop || document.body.scrollTop || 0))+'px'
fixedPos[i].style.left=(fixedPos[i].fixedLeft+(document.documentElement.scrollLeft || document.body.scrollLeft || 0))+'px'
}
}else{
fixedPos[o]=o
fixedPos[o].fixedTop=t ||0
fixedPos[o].fixedLeft=l ||0
}
}
I just set the window.onscroll event to call this function, and send each element in one time after creation to set the variable pos....this is NOT how I would prefer to do this...
Bookmarks