Using SimpleModal (jQuery plugin) to display a popup iFrame without unnecessary scrollbars
Posted
by Alex Black
on Stack Overflow
See other posts from Stack Overflow
or by Alex Black
Published on 2010-04-28T00:30:11Z
Indexed on
2010/04/28
0:33 UTC
Read the original article
Hit count: 686
I'm using SimpleModal:
http://www.ericmmartin.com/projects/simplemodal/
And displaying an iframe, as per the example:
// Display an external page using an iframe
var src = "http://365.ericmmartin.com/";
$.modal('<iframe src="' + src + '" height="450" width="830" style="border:0">', {
closeHTML:"",
containerCss:{
backgroundColor:"#fff",
borderColor:"#fff",
height:450,
padding:0,
width:830
},
overlayClose:true
});
And the popup has two sets of scrollbars, one perhaps for the HTML element representing the popup, and one for the iFrame. Try the demo to see.
Ideally I'd like no scrollbars if the content fits, otherwise a single vertical scrollbar.
Any ideas? Thanks!
- Alex
© Stack Overflow or respective owner