Search code examples
jquerycssfancybox

Fancybox in the size of the div


I want to know how to resize the fancybox in order to give it the same hight and width of the div that will be showed in the fancybox.

Thanks


Solution

  • For version 1.3

     $.fancybox.resize();
    

    For version 2.0 or heigher Fancybox

     $.fancybox.update()
    

    it resize the active fancybox based on the size of the content inside it.