How do you resize Fancybox at runtime?

后端 未结 18 1854
情深已故
情深已故 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

    I just posted a suggested patch to Fancybox on its Google Group https://groups.google.com/forum/#!topic/fancybox/fuUuBJyTrH8 that adds a public method $.fancybox.reshow(). This will recalculate the height and width of the fancybox. It works with both window.onorientationchange and window.onresize, for example:

    window.onresize = function() {
        $.fancybox.reshow();
    }
    

提交回复
热议问题