jquery - FadeIn and FadeOut when page scroll -


i create div, put social link. want when user scroll page more > 100, div fade in, , when user come < 100, fadeout. how can it?

<style type="text/css">     #social-icons-wrapper {     /* custom properties */     padding:10px;     text-align:center;     font-size:20px;      background: #000;     color:#fff;     width:100%;     height:32px;     /* required properties */     display:none;     position: fixed;     top: 0;     z-index: 999999; } </style>  <div id="social-icons-wrapper"><!-- social icons here --></div>  <script type="text/javascript"> //<![cdata[  $(function () {      $(window).scroll(function () {          if ($(this).scrolltop() > 100) {              $('#social-icons-wrapper').stop().fadein(200);          } else {              $('#social-icons-wrapper').stop().fadeout(200);          }      });  }); //]]>  </script> 

Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -