calin-beard
10/20/2017 - 5:38 PM

Dynamic iframe size - fits the size of the html element (container)

Dynamic iframe size - fits the size of the html element (container)

<script>
    $(document).ready(function() {
        $('.widget-html iframe').css('width', function(i, v) {
            return $(this).closest('.widget-html').css('width');
        });
        $('.widget-html iframe').css('height', function(i, v) {
            return $(this).closest('.widget-html').css('height');
        });
    })
</script>