How do you resize Fancybox at runtime?

后端 未结 18 1897
情深已故
情深已故 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 04:03

    This method works for me. :)

    $(".fancybox-wrap.fancybox-desktop.fancybox-type-iframe.fancybox-opened").css({"height": heightToAdjust});
    $(".fancybox-inner").css({"height": heightToAdjust});
    if ($.fancybox.isOpened) {
       if ($.fancybox.current) {
          $.fancybox.current.height = heightToAdjust;
       }
    }
    $.fancybox.reposition();
    

提交回复
热议问题