Skip to content

Instantly share code, notes, and snippets.

@lizardking8610
Created May 18, 2017 17:27
Show Gist options
  • Select an option

  • Save lizardking8610/5c2adc0c352feb522c6eb0c034b57548 to your computer and use it in GitHub Desktop.

Select an option

Save lizardking8610/5c2adc0c352feb522c6eb0c034b57548 to your computer and use it in GitHub Desktop.
jQuery: partial page refresh
$('#button1').click(function() {
var url = "http:www.your-url.com?ID=" + Math.random(); //create random number
setTimeout(function() {
$("#elementName").load(url+" #elementName>*","");
}, 1000); //wait one second to run function
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment