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

The Future of Technology: Emerging Trends to Watch in 2025

Introduction As we navigate through 2025, the technological landscape continues to evolve at an unprecedented pace. Innovations that once se...