http://jsfiddle.net/cbp4N/16/
If you show the div. Change the scroll position and then hide and show it agian the scroll position is lost.
am I doing anythi
Jquery's .scrollTop() works well if you maintain the position as 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