I have a complete page with a menu like this:
<li><a href="page1.html">Page 1</a></li>
<li><a href="page2.html">Page 2</a></li>
and so on. This is working just fine without jQuery but because I would like some animation effects on side change I decided to use jQuery, like:
$(document).ready(function(){
$('a').click(function(e){
e.preventDefault();
$('#wrapper').load(link+' .content');
});
});
By using this jQuery, an exact representation of page1.html, page2.html is reconstructed, but with ajax requests instead. My problem here is that I of course would like the url in the web browser to change accordingly. Now it just says "www.mypage.com" when I would like it to show "www.mypage.com/page1.html" when the first link is fetched with ajax. How can I achieve that?