Trigger hype functions with Hashtags

Continuing the discussion from Browsers Back Button:

The idea is to add to the URL a custom #hashtag each time you trigger each symbol.

This are the ingredients.

It allows you to modify the URL so you can input a hashtag location.

if (window.location.href.indexOf("lobby") > -1) { // your code here }
This allows to launch any function you want depending on what the #hashtag in the URL is.

$(window).bind("hashchange", function() { // more codes });
This is the only jquery code needed, it allows to launch a function if the URL is modified, which is going to happen when you switch from symbol to symbol.

In my file you are going to find that I am using hype API to launch a group of “IF” that will trigger a different even for each # in the URL. (103.5 KB)


Nice technique!