Prepend iframe with external URL

Prepend iframe with external URL

by Shree Khanal

HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<body class="dwqa-question-template-default">
<div id="page" class="site grid-container container hfeed ">
  <div id="content" class="site-content"></div>
</div>
</body>

JavaScript

$('.dwqa-question-template-default div.site').prepend('<iframe src="https://example.com/" id="dwqasq" style="overflow:hidden; height:350px; width:100%;"></iframe>');