Press ESC to close

Or check our Popular Categories...

change url jquery

1 Article
1
4 Min Read
0 3

PROBLEM: How to Modify the URL without reloading the page? SOLUTION 1: Updating address bar with new URL without hash or reloading the page Example: [pastacode lang=”javascript” manual=”%20function%20processAjaxData(response%2C%20urlPath)%0A%7B%0A%20%20%20%20%20document.getElementById(%22content%22).innerHTML%20%3D%20response.html%3B%0A%20%20%20%20%20document.title%20%3D%20response.pageTitle%3B%0A%20%20%20%20%20window.history.pushState(%7B%22html%22%3Aresponse.html%2C%22pageTitle%22%3Aresponse.pageTitle%7D%2C%22%22%2C%20urlPath)%3B%0A%20%7D%0A%0A” message=”javascript code”…

Continue Reading
X