June 23, 2015

How to Set a Dynamic Width / Height on Fancybox?


Yes it's possible first you can turn off "autoSize" and then set width as "auto":

$.fancybox.open({
    content  : 'Lorem ipsum dolor sit ame',
    autoSize : false,
    width    : "auto",
    height   : "80%"
});​

To see example <a href="http://jsfiddle.net/2VmrG/" target="_blank">click here!</a>

Enjoy!

No comments:

Post a Comment

Integrating Google reCAPTCHA v3 in HTML Form with PHP

  What is Google reCAPTCHA v3? Google reCAPTCHA is a free service that helps protect websites from spam and abuse. reCAPTCHA v3 is the lates...