scroll - DOCTYPE problem, jQuery -


Scroll.js is used for #bird blocks, which adheres to page scrolling.

The main problem - it's working, if I remove the DockType line, then this is the one:

   

and If the crypt is on, it does not work.

Here's the html:

   DOCTYPE HTML PUBLIC "- // W3C // DTD XHTML 1.0 Transcription // N" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> & Lt; Html & gt; & Lt; Top & gt; & Lt; Script src = "jquery.js" type = "text / javascript" & gt; & Lt; / Script & gt; & Lt; Script src = "scroll.js" type = "text / javascript" & gt; & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Div style = "position: relative; height: 20000px" & gt; & Lt; Div id = "bird" style = "position: full; left: 0; top: 20px; width: 200px" & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Body & gt; & Lt; / Html & gt;  

and JS:

deleted

to remove doctype, Do not ask its required.

You need to change it:

  Document.body.scrollTop  

with:

  document.documentElement.scrollTop  

scrollTop < / Code> & lt; Body & gt; instead of element & lt; Html & gt; belongs to the element.

(Note that document.body.scrollTop appears in your code three times.)


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -