I want to build a basic anchor based navigation system using jQuery. I don't really want to use a plugin like this as suggested here. Can anyone help me out with the basic logic of building a system like this?
Essentially I want to be able to have one page serve up multiple ajax content via links like this:
/myurl.html#state1
/myurl.html#state2
Currently I just bind to the click handler of links to open up dialogs etc. I could then change the URL to /myurl.html#state1
. The question is do I do it this way, or do I just make the <a>
tags themselves point to that url and then use jQuery to detect when the URL has changed meaning itll also work on page load too?
Any suggestions / thoughts would be great - thanks