jquery - Scroll position lost when hiding div -
if show div. change scroll position , hide , show agian scroll position lost.
am doing wrong or bug. there way round som plugins.
/anders
thanks answers , solutions. if div hide outer div , scrolling div deep inside div hide. there smart way fix this. becuse cant set/save scroll position in callback of hide/show
jquery's .scrolltop() works if maintain position data.
$('#cbxshowhide').click(function(){ if(this.checked) { $('#block').show('fast',function() { $(this).scrolltop($(this).data('scroll')); }); } else { $('#block').data('scroll',$('#block').scrolltop()); $('#block').hide('fast'); } });
Comments
Post a Comment