Hide div when in top of page with jquery -


When I scroll the page to the top and when it does not come with jquery, I want to hide a div I am trying. / P>

Any way to do this?

EDIT: By concealing and showing I mean it gets erased and get out.

Scroll event and use scrollTop ()
  $ (window). on ("scroll", function {var scrollpace = $ (window) .scrollTop (); if (scrollpost & lt; = 0) {$ (".dvnidsehiding") .FadeOut ();} and {$ (" Edit.   

Edit: The scrollTop query has been updated, as if jQuery provides a compatibility layer if Element is window .

Comments

Post a Comment

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -