You can use jquery to hide an element in different ways .hide() , .fadeOut() , .slideUp()
or css using display:none
If you want the element to retain its space, you need to use
$('.ADD').css('visibility','hidden')
If you do not want the element to retain its space, you can use
$('.ADD').css('display','none')
$(document).ready(function() { $(".adding").click(function(e) { e.preventDefault(); $('#iframeplace').html('<span class="loading">LOADING...</span>'); setTimeout(function() { $("#iframeplace").html("<iframe name='someFrame' id='someFrame' width='560' height='315'></iframe>"); $(".adding").hide(); }, 3000); }) });
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <a href="secondpage.html" class="adding"> <div class="ADD">ADD</div> </a> <div id="iframeplace"></div>
source share