Hello Everyone, I am going to share the how to auto refresh a particular div using jQuery. In jQuery, we are using setTimeout () function for auto refresh a div without reloading your page each and every 5 seconds. Click for live demo The HTML code sample as given below. 1 2 3 4 5 6 7 8 //The HTML code sample <div> <input type= "button" id= "btnShow" value= "Click for Show div" /> </div> <div class= "fonts" id= "divShow" > <h2>Hi, Welcome you to code-sample.com.</h2> It will disappear in 5 seconds! </div> //The HTML code sample <div> <input type="button" id="btnShow" value="Click for Show div" /> </div> <div class="fonts" id="divShow"> <h2>Hi, Welcome you to code-sample.com.</h2> It will disappear in 5 seconds! </
Angular, React, JavaScript, Java, PHP, SQL, C#, Vue, NodeJs, TypeScript and Interview Questions Answers