javascript - Dynamically Change Page Content and Set Hash with AJAX/jQuery -
I am trying to create a webpage that will fill a device by dynamically using AJAX. I'm only able to update the devil content with the following AJAX code:
  $ (document) .ready (function () {$ ("# projects-list a"). (Function (e) {e.preventDefault (); var url = $ (this) .attr ('href'); // Get the link that you want to load data from $ .ajax ({type: ' GET ', url: Url, success: work (data) {$ (' # content ') .Fedaut (300, function) ($ (' # content ') .html (data) .delay (200). FadeIn (300 );});}});});});    However, I hope to find a way to update the page URL or to change the hash. For example, when a user is given a link to  /projects.html , they will be sent to a page of the link, and then when a link is clicked, the content is used by AJAX And changed to URL  /projects.html#first  In this way the user has navigated to  /projects.html#first , they are the origin of the projects Instead of choosing from the list, you will see content for the first project.    
  I  URL  and  path     P>     
 
  
Comments
Post a Comment