I'm trying to load a PPT in a div while using replaceWith with google docs like this:
$("#u1").click(function() {
$(".cuerpo").replaceWith('<div class="cuerpo">' + '<iframe src="http://docs.google.com/gview?url=http://**************.pptx&embedded=true" style="width:600px; height:500px;" frameborder="0"> </iframe>' + "</div>");
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
The problem is that it take a few seconds to load completely and I need to display some message that the div is loading, is there anyway to do it?