How do you resize Fancybox at runtime?

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

    If Fancybox was part of jQuery UI, you'd do it like this:

    $("tag").fancybox.option('frameWidth', 500);
    

    But as it doesn't seem to provide such a method, you need to set the CSS directly:

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

提交回复
热议问题