How to reload a div without reloading the entire page?
How to reload or refresh a div without reloading the entire page using jquery
In this tutorial, you will be learning how can we refresh a DIV without reloading the whole page.
Now, Let's refresh a div content using jquery without any page reload on a Button Click. jQuery.load() method is probably the easiest way to load data asynchronously using a selector, but you can also use any of the jquery ajax methods (get, post, getJSON, ajax, etc.)
Note that load allows you to use a selector to specify what piece of the loaded script you want to load, as in given below:
Example 1: Let's create a index.php and print the TIME using date() function in a "<div>" tag and reload this div without page reload or refresh, using jquery. We will be using jQuery setInterval() method to call that load() method to refresh div content every 1 second as given below:
Thanks for reading.
Latest PostsHow to disable right click using jQuery ? How to disable submit button until form is filled in jquery How to disable or enable form submit button in jQuery ? How to reload a div without reloading the entire page? How to refresh or reload a page automatically in jQuery How to remove closest div element on click using jquery How to get the closest input value from clicked element with jQuery How to get closest data of table row using map function in jQuery How to get the closest table row data using jquery How to remove the div or element using jquery
© Copyright - 2018 - 2022 | All rights reserved at Funda of Web IT