jQuery UI Dialog w/ Resizable iFrame

Today I went looking for a jQuery Modal Plugin that would allow me to display resizeable iframe content.

Although there are many jQuery Modal Plugins out there, there are not many that support iframe content. Out of those that openly support the iframe, I personally didn’t think they look all that good and I didn’t see any that supported the resize feature.

So, then I decided to take a deeper dive into the the jQuery UI Dialog Plugin to see what could be possible. Upon further scrutiny, I found that as of June 25, 2008 @rworth added functionality to the the plugin to support autoResize.

All I really had to do was create an iframe, call the jQuery UI Dialog, turn on the autoResize, do some initial resizing, and presto chango… a resizable modal with iframe content was born!











Feel free to check out the online demo of the above code and/or download the files yourself if you want.

If you enjoyed this post, please consider sharing it with others via the following Twitter or Reddit buttons. Also, feel free to checkout my egghead.io profile page for addition free and subscription lessons, collections, and courses. As always, you can reach out to me on Twitter at @elijahmanor. Thanks and have a blessed day!

Reddit