How do I change the URL without refreshing the page?
I\'ve built a website with CodeIginer and I want to implement AJAX and JQuery in one of my pages. The problem is
Use hash tags via Javascript, so in the button's click event handler:
location.hash = "param2"
Which will change http://example.com/mypage/#whatever
to
http://example.com/mypage/#param2
Of course, you could also put your "folders" after the hash, so, with a base url of http://example.com/ you then add:
location.hash = "/MyPage/MySubPage/MyInfo";
which changes it to http://example.com/#/MyPage/MySubPage/MyInfo