How do you resize Fancybox at runtime?

后端 未结 18 1866
情深已故
情深已故 2020-11-30 03:22

Does anyone know how to resize the jQuery Fancybox during runtime?

When initializing the fancybox I can do this:

$(\"tag\").fancybox({ \'frameWidth\         


        
18条回答
  •  爱一瞬间的悲伤
    2020-11-30 03:45

    Alan's solution is incomplete because the box is no longer centered on the screen after modifying the size (at least with the latest jquery and fancybox versions).

    So, the complete solution would be:

    $("#fancy_outer").css({'width': '500px', 'height': '500px'});
    $("tag").fancybox.scrollBox();
    

提交回复
热议问题