jquery - Scroll position lost when hiding div -


http://jsfiddle.net/cbp4n/16/

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');     } }); 

example


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -