Question

I'm currently using http://benalman.com/projects/jquery-hashchange-plugin/ and I noticed that my hashes show up as "/#page" rather than "/#/page" Im trying to copy the look from jQuery Address. But the reason I can not use Asual is because it doesn't have a trigger event like the hashchange plugin does.

current setup:

$j(window).bind('hashchange', function(e) { 
   run w/e functions here
});

load json objects

$(window).trigger('hashchange');

I noticed in jQuery Address there is a return on the click selector. Maybe I need something like that?

Was it helpful?

Solution

There is nothing special about the extra / in the url.

Just put it in the anchor like normal: <a href="#/page">

Or when manually setting the hash: location.hash="/page"

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top