Javascript : How to refresh page with JQuery ?
Sometimes, easy thing such as refreshing a page with javascript or jquery is the hardest thing to remember. To refresh a page with JQuery, use this code fragment below :
$('#yourbuttonid').click(function() {
location.reload();
});
Options that you might to know about
location.reload(false) - Default setting and will reload the current page from the cache.
location.reload(true) - Force a reload from the server.
By Adam Ng
IF you gain some knowledge or the information here solved your programming problem. Please consider donating to the less fortunate or some charities that you like. Apart from donation, planting trees, volunteering or reducing your carbon footprint will be great too.
Advertisement
Tutorials
+12k Golang : Read from buffered reader until specific number of bytes
+12.7k Golang : Get uploaded file name or access uploaded files
+7k Golang : Variadic function arguments sanity check example
+4.7k Golang : Use NLP to get sentences for each paragraph example
+3.4k Java : Generate multiplication table example
+5.1k Golang : Debug with Godebug
+6.4k Golang : Handling Yes No Quit query input
+4.4k Golang : Shortening import identifier
+5.8k Mac OSX : Find large files by size
+29.4k Golang : Get local IP and MAC address
+4.4k Golang : Display advertisement images or strings on random order
+4.7k Golang : Fix opencv.LoadHaarClassifierCascade The node does not represent a user object error