Created
May 18, 2017 17:27
-
-
Save lizardking8610/5c2adc0c352feb522c6eb0c034b57548 to your computer and use it in GitHub Desktop.
jQuery: partial page refresh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $('#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