I found this code in the accepted answer here…
which loads an iframe into a specific area
via a button click…
<a href="#" onclick="setIframe(this,'http://www.stackoverflow.co.uk')" >Set the Iframe up</a>
function setIframe(element,location){
var theIframe = document.createElement("iframe");
theIframe.src = location;
element.appendChild(theIframe);
}
how do I change this so that it allows me to style the height width and scrolling?
This is not jQuery, but pure Javascript:
This is not part of your question, but here is how you toggle a div with jQuery:
Markup:
jQuery: