title: How to show a div for a while before second page load in iFrame
body: <p>I have a div with name ADD . and with this button I want to load a second page in iframe. the question is how can I show a loading div for 4 second before load second page in second ? I wrote some code but the code is not working correctly.</p>
  
  <p>here is my snippet :</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$(document).ready(function() {
    $(".adding").click(function(e) {
      e.preventDefault();
      $('#someFrame').html('&lt;span class="loading"&gt;LOADING...&lt;/span&gt;');
      setTimeout(function() {
        $("#someFrame").attr("src", $(this).attr("href"));
      }, 3000);
    })
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt;
  
  &lt;a href="secondpage.html" class="adding"&gt;
    &lt;div&gt;ADD&lt;/div&gt;
  &lt;/a&gt;
  
  &lt;iframe name="someFrame" id="someFrame" width="560" height="315"&gt;&lt;/iframe&gt;</code></pre>
  </div>
  </div>
  </p>