html - Jquery panel + scroll from top detection? -


i testing type of panel jquery : http://codyhouse.co/gem/css-slide-in-panel/

but when want detect scroll top make appear div : no way :(

a means detect scroll top inside panel? use kind of thing without result http://jsfiddle.net/apaul34208/zykar/3/

$(document).scroll(function () {     var y = $(this).scrolltop();     if (y > 500) {         $('.cache').fadein();     } else {         $('.cache').fadeout();     }  }); 

best regards,

is looking for?

http://jsfiddle.net/zykar/2327/

html

<div class="topmenu"></div> 

css

body {     height:1600px; } .topmenu {     display: none;     position: fixed;     top: 0;     width: 100%;     height: 60px;     border-bottom: 1px solid #000;     background: red;     z-index: 1; } 

javascript

$(document).scroll(function () {     var y = $(this).scrolltop();     if (y > 1) {         $('.topmenu').fadein();     } else {         $('.topmenu').fadeout();     }  }); 

Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -