This question has already been answered:

Here is an example code. When clicking on "Click" in a div with class = "red", conten_reg.php is loaded.

How to make the url change and be working?

JQUERY

$(document).ready(function(){ $("#dlb").click(function(){ $(".red").load("conten_reg.php"); }) }); 

Html

 <div class="red"> <span id="dlb">Клик</span> </div> 

Reported as a duplicate by members of Pavel Mayorov , Qwertiy , Regent , aleksandr barakin , Alexey Shtanko Jun 17 '15 at 15:48 .

A similar question was asked earlier and an answer has already been received. If the answers provided are not exhaustive, please ask a new question .

  • Something I did not quite understand what you want to do. - Nord001
  • The div is updated and so that the url is updated and the updated url works so that it does not throw out the home page. - ahserg
  • and the url update algorithm, and which one? His conten_reg.php should issue? - Nord001

1 answer 1

You here: jQuery hashchange event .

  • And using the usual jquery library you can't do such a thing? - ahserg
  • @Vfvtnjd, hash update is completely different - Specter
  • pancake pagano I thought that the script of history api - ahserg is written in jquery