Topic awaiting preservation: Hey, Document! Get The God Damn Fucking Element By the Bloody ID! |
|
---|---|
Author | Thread |
Maniac (V) Mad Scientist From: 127 Halcyon Road, Marenia, Atlantis |
posted 06-27-2003 03:35
I'm writing a script for my site that slides a layer on a page when the user scrolls up and down. It works just fine but for one minor hitch- I apparently have a deficiency understanding the simplest of syntax regarding document.getElementById(). |
Maniac (V) Mad Scientist From: 127 Halcyon Road, Marenia, Atlantis |
posted 06-27-2003 06:33
Ah... a breath of fresh air.. code: /***** Javascript by Petskull *****\
|
Maniac (V) Inmate From: Brisbane, Australia |
posted 06-27-2003 06:35
Try: |
Maniac (V) Mad Scientist From: 127 Halcyon Road, Marenia, Atlantis |
posted 06-27-2003 08:13
ah, yes.... |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 06-27-2003 21:46
Petskull, I just managed to dig this out of some ancient script I wrote: mozilla holds the equivalent of scrollLeft and scrollTop in these variables: |
Paranoid (IV) Inmate From: Northumberland, England |
posted 06-28-2003 14:00
yo petskull this link may help you http://www.xs4all.nl/~ppk/js/doctypes.html is contains all the scrolltop, pixeltop, height mumbo jumbo going and which browsers like it and which don't and what exactly each method does in different browsers. |
Paranoid (IV) Inmate From: Milwaukee |
posted 06-28-2003 17:37
You know, I've heard people call Petskull's topic headings random or uninformative, but I think this one really cuts right to the heart of the issue. Good on ya! |