jquery - How to trigger the html scroll when dynamic content is loaded inside the fancybox -


i have custom fancybox (fancybox2) in content loaded dynamically. has content grows box remains fixed in browser window , scrollbar html not triggered.

however if run $.fancybox.update() adjusts , shows scrollbars. how can automate without running above line?

my fancybox definition follows

$.fancybox({      href     : '#mycontainer'     autosize : true,     maxwidth :  760,     fittoview: false,     padding  : 0,     fixed    : true,     autocenter : true,     beforeshow :  function(){        $('.fancybox-overlay-fixed').css({'overflow-y':'auto'});     },     aftershow :  function(){        $('.fancybox-overlay-fixed').css({'overflow-y':'auto'});     },  }); 

as per docs :

$.fancybox.update() - auto-sizes fancybox height match height of content.

autowidth : if set true, 'inline', 'ajax' , 'html' type content height auto determined. boolean; default value: false

can try autowidth:true in fancybox config object ?


Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

java.lang.NoClassDefFoundError When Creating New Android Project -

Decoding a Python 2 `tempfile` with python-future -