Jquery clear and write

by dimaslanjaka

HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<div class='blog-posts hfeed'>
<div class='mobile-post-outer'>
<a href='https://website-service-free.blogspot.co.id/2017/05/apa-itu-domain-age.html?m=1'>
<h3 class='mobile-index-title entry-title' itemprop='name'>
Apa itu Domain Age
</h3>
<div class='mobile-index-arrow'>&rsaquo;</div>
</div>
</div>

CSS

object{width:100%; height: 100%}
div#object{height:322;width:auto;display:inline-block}

JavaScript

//Removing Contents
jQuery('.blog-posts,.hfeed div').html('');

$(".blog-posts,.hfeed").html('<style type="text/css" scoped="">div#object{height:322;width:auto;display:inline-block}</style><div class="box"> <iframe src="http://cdn.rawgit.com/KompiAjaib/kompi-html/master/randomposts1.html?url=www.webmanajemen.xyz&amp;color=555555" frameborder="0" scrolling="no" height="322" align="left"></iframe></div><div class="box"> <iframe src="http://cdn.rawgit.com/dimaslanjaka/ce4decdfb54a073ab4b7fc05ccfd2a4e/raw/23ca49ecbf722d89e72058d4d563e72f1103b8a0/Random-post.arlina.html" frameborder="0" scrolling="no" height="322" align="left"></iframe></div>');


$('#result').load('/p/test.html #container');