getting a function to refresh when you reload a page jquery code example
Example 1: jquery reload page
$('#myElement').click(function() {
location.reload();
});
Example 2: how to completely reload page in jquery
// reload page from cache:
location.reload();
// reload page from server:
location.reload(true);