javascript - jquery fadeOut div unable to fadeIn -
i have adapted fiddle http://jsfiddle.net/onqn2gjj/4/ fade search bar out on scroll, once search bar gone, cannot clicking search icon.
how can modify script stop happening please?
here website: http://uwinat.o2clite.com/
thanks
jquery(document).ready(function($) { $(window).scroll(function() { if ($(this).scrolltop()>0) { $('.search').fadeout(); } else { $('.search').fadein(); } }) });
is because on scroll hiding parent of element
you can see here: http://screencast.com/t/zrnnrbei
if fix work:http://screencast.com/t/h2m7k1636ver
note
i recomend use debouncer scrolling event... scroll event self kill performance... underscorejs library has one.
also try using css animations instead of jquery. should avoid using javascript animations...
Comments
Post a Comment