ARTICLES > Javascript

[Javascript] Adjust height of iframe after loaded Turn Back

2018-10-09 12:11:13

 
$('iframe').load(function() {
    this.style.height =
    this.contentWindow.document.body.offsetHeight + 'px';
});
Ref: https://stackoverflow.com/questions/3846132/jquery-get-height-of-iframe-content-when-loaded
Turn Back