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 - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -