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
Post a Comment