{"id":240,"date":"2023-02-07T11:32:00","date_gmt":"2023-02-07T11:32:00","guid":{"rendered":"https:\/\/www.devopssupport.in\/blog\/?p=240"},"modified":"2023-03-20T15:06:17","modified_gmt":"2023-03-20T15:06:17","slug":"refresh-div-without-page-reloading-by-using-of-jquery","status":"publish","type":"post","link":"https:\/\/www.devopssupport.in\/blog\/refresh-div-without-page-reloading-by-using-of-jquery\/","title":{"rendered":"Refresh Div without page reloading by using of jquery"},"content":{"rendered":"\n<p>You can use jQuery&#8217;s <code>load<\/code> method to refresh a specific division (Div) of a web page without reloading the entire page. <\/p>\n\n\n\n<p>Here&#8217;s an example:<\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/AvinashKumar33\/a9fd5dff45844d91fc12eeee3313cf01.js\"><\/script>\n\n\n\n<p>In this example, when the button with an ID of <code>refreshButton<\/code> is clicked, the division with an ID of <code>myDiv<\/code> will be reloaded with updated content from the same URL. The <code>location.href<\/code> property is used to get the current URL of the page, and the <code>#myDiv<\/code> at the end specifies that only the division with the ID <code>myDiv<\/code> should be loaded, not the entire page.<\/p>\n\n\n\n<p>Note that in order to use this script, you need to have jQuery included in your HTML file. You can include it by adding the following code to the <code>&lt;head&gt;<\/code> section of your HTML file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;script src=\"https:\/\/code.jquery.com\/jquery-3.6.0.min.js\"&gt;&lt;\/script&gt;<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>You can use jQuery&#8217;s load method to refresh a specific division (Div) of a web page without reloading the entire page. Here&#8217;s an example: In this example,&#8230; <\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[79,81],"class_list":["post-240","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-jquery","tag-reloading"],"_links":{"self":[{"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/posts\/240","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/comments?post=240"}],"version-history":[{"count":3,"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/posts\/240\/revisions"}],"predecessor-version":[{"id":253,"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/posts\/240\/revisions\/253"}],"wp:attachment":[{"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/media?parent=240"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/categories?post=240"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/tags?post=240"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}