<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Refresh div contents in time interval &#8211; Sibeesh Passion</title>
	<atom:link href="https://mail.sibeeshpassion.com/tag/refresh-div-contents-in-time-interval/feed/" rel="self" type="application/rss+xml" />
	<link>https://mail.sibeeshpassion.com</link>
	<description>My passion towards life</description>
	<lastBuildDate>Wed, 05 Aug 2015 08:48:29 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>/wp-content/uploads/2017/04/Sibeesh_Passion_Logo_Small.png</url>
	<title>Refresh div contents in time interval &#8211; Sibeesh Passion</title>
	<link>https://mail.sibeeshpassion.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Loading or refreshing a div content uisng JQuery</title>
		<link>https://mail.sibeeshpassion.com/loading-or-refreshing-a-div-content-uisng-jquery/</link>
					<comments>https://mail.sibeeshpassion.com/loading-or-refreshing-a-div-content-uisng-jquery/#disqus_thread</comments>
		
		<dc:creator><![CDATA[SibeeshVenu]]></dc:creator>
		<pubDate>Wed, 05 Aug 2015 00:40:22 +0000</pubDate>
				<category><![CDATA[CodeProject]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[Loading Div Content]]></category>
		<category><![CDATA[refresh div contents]]></category>
		<category><![CDATA[Refresh div contents in time interval]]></category>
		<guid isPermaLink="false">http://sibeecst_passion.com/?p=7161</guid>

					<description><![CDATA[In this post, we will discuss how we can load or refresh some contents to our container div in a particular interval of time. To do this we will be using normal setInterval in JQuery. We will create an element which is to be considered as our container div. And by using setInterval , we will refresh the content which we creates dynamically to our container div. I hope you will like this. Using the code To work with, load your jQuery reference first. I am using following version of JQuery. [js] &#60;script src=&#34;http://sibeeshpassion.com/content/scripts/jquery-2.0.2.min.js&#34;&#62;&#60;/script&#62; [/js] Create a container div [html] [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>In this post, we will discuss how we can load or refresh some contents to our container div in a particular interval of time. To do this we will be using normal <em>setInterval </em> in JQuery. We will create an element which is to be considered as our container div. And by using <em>setInterval </em>, we will refresh the content which we creates dynamically to our container div. I hope you will like this.</p>
<p><strong>Using the code</strong></p>
<p>To work with, load your jQuery reference first. I am using following version of JQuery.</p>
<p>[js]<br />
&lt;script src=&quot;http://sibeeshpassion.com/content/scripts/jquery-2.0.2.min.js&quot;&gt;&lt;/script&gt;<br />
[/js]</p>
<p><em>Create a container div</em></p>
<p>[html]<br />
&lt;div id=&#8217;container&#8217;&gt;&lt;/div&gt;<br />
[/html]</p>
<p>So now we can do our script part.</p>
<p><em>Implementation</em></p>
<p>Please find the below scripts.</p>
<p>[js]<br />
$(document).ready(<br />
function() {<br />
setInterval(function() {<br />
var randomnumber = Math.floor(Math.random() * 20);<br />
    var html=&#8221;;<br />
    for(i=0;i&lt;randomnumber;i++)<br />
    {<br />
        html+='&lt;p&gt;&#8217;+ randomnumber+ &#8216;&lt;/p&gt;&#8217;;<br />
    }<br />
    $(&#8216;#container&#8217;).html(html);<br />
}, 1000);<br />
});</p>
<p>[/js]</p>
<p>As you can see, we are creating some random numbers which is less than 20.<br />
[js]<br />
var randomnumber = Math.floor(Math.random() * 20);<br />
[/js]</p>
<p>And assigning the random value to the dynamically crated p tag.</p>
<p>[html]<br />
html+='&lt;p&gt;&#8217;+ randomnumber+ &#8216;&lt;/p&gt;&#8217;<br />
[/html]</p>
<p>Now we need to style our p tag as follows.</p>
<p>[css]<br />
p {<br />
  border: 1px solid #ccc;<br />
  border-radius: 5px;<br />
  height: 18px;<br />
  width: 18px;<br />
  padding: 5px;<br />
  text-align: center;<br />
  background-color: #999;<br />
  color: #fff;<br />
  float: left;<br />
}<br />
[/css]</p>
<p>That is all, it is time to run our code.</p>
<p>jsfiddle link: <a href="http://jsfiddle.net/sibeeshvenu/2t7fac89/" target="_blank">Loading or refreshing a div content jsfiddle</a></p>
<p><strong>Output</strong></p>
<p><img decoding="async" src="http://sibeeshpassion.com/wp-content/uploads/2015/07/LoadOrRefreshContentsDivUsingJQuery.gif" alt="" /></p>
<p><strong>Conclusion</strong></p>
<p>I hope you liked this article. Please share me your valuable feedback. Thanks in advance.</p>
<p>Kindest Regards<br />
<a href="http://sibeeshpassion.com" target="_blank">Sibeesh Venu</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://mail.sibeeshpassion.com/loading-or-refreshing-a-div-content-uisng-jquery/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
