codingtcher.com
Theme Night
Home
Login

Reload page in jquery

//refreshing a page with jquery
$(document).ready(function() {
    $("button").click(function() {
        location.reload(true);
    });
});

//refresh a page in jquery
$('#something').click(function() {
    location.reload();
});

//refresh div jquery
$("#mydiv").load(location.href + " #mydiv");

//how to completely reload page in jquery
// reload page from cache:
location.reload();
// reload page from server:
location.reload(true);

//jQuery refresh page
$('#myElement').click(function() {
    location.reload();
});

Related Code