Inserting the doctype
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
the $("body").scrollTop() returns 0 instead of the correct value.
$("body").scrollTop()
Any suggestion?
asked Oct 23 '09 at 08:49
Bikrob 11●1●2
edited Oct 26 '09 at 19:57
Pietro Polsinelli ♦♦ 40●7
You should get the "document" scrollTop():
$(document).scrollTop()
answered Oct 23 '09 at 17:15
Matteo Bicocchi ♦♦ 1776●1●2●9
edited Oct 23 '09 at 20:31
Once you sign in you will be able to subscribe for any updates here
Answers
Answers and Comments
Tags:
jquery ×69 doctype ×2 scrolltop ×1
Asked: Oct 23 '09 at 08:49
Seen: 3,695 times
Last updated: Mar 19 at 05:36
I need to get the last class of an element, is there a simple way?
textlinks instead of icons
jQuery & HTML 5 <canvas> element in IE
How do I select dynamically added fields?
Jkmegamenu drop downs moving left when window is resized in Chrome
Is there a way on jquery.mb.menu to roll over a sequence of menuvoices without opening all the submenu?
Is there any plugin Jquery for child window (Modal) with minise, maximise and close on top right corner..
Form Field Updates in JQuery/AJAX using any Field as a Starting Point
[closed] mbContainer.js and $.browser
Making a Masked Gallery in CSS/JQuery
jQuery main site - Matteo Bicocchi