In raw Javascript, how would one go about checking that a specific hash tag exists in a url, then grab the value?
Example: http://www.example.com/index.html#hashtag1
jQuery BBQ (back button and query) leverages the HTML5 hashchange event to allow simple, yet powerful bookmarkable #hash history. In addition, jQuery BBQ provides a full .deparam() method, along with both hash state management, and fragment / query string parse and merge utility methods.
In short: This library allows you to dynamically change a hash "query string" within your page and have the URL match. It also allows you to dynamically pull values and normalizes working with the "query string." Finally it will add the query strings into the history which allows the back button to function as a navigation between previous query hash values.
A good move for UX would be to check out a library like jQuery BBQ :)