title: How do I load the content inside div after every 5 seconds?
body: <p>I have been trying to load a particular div element after every 5 seconds with some stock quotes which I received using a stock widget from <a href="http://webthegap.com/widgets/stock-market/" rel="nofollow noreferrer">http://webthegap.com/widgets/stock-market/</a>
  This widget is static and only refreshes when I refresh the page. So far my jquery code is :-</p>
  
  <pre><code>setInterval("my_function();",5000); 
      function my_function(){
        $('#refresh').load(location.href + '#time');
      }
  </code></pre>
  
  <p>And HTML ids in which stock widget is placed is </p>
  
  <pre><code>&lt;div id="refresh" class="stock-section"&gt;
      &lt;div id="time" class="container"&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The problem is, the page does refreshes but the data inside the widget disappears as you can see in the screenshot below :-</p>
  
  <p><a href="https://i.stack.imgur.com/RJ7qT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RJ7qT.png" alt="Before refresh Image"></a></p>
  
  <p><a href="https://i.stack.imgur.com/1aFNp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1aFNp.png" alt="After refresh Image"></a></p>
  
  <p>Is there any way to fix this??</p>