Question

I'm using the jQuery Address plugin to do some dynamic address changes. So far I've got it to change the address bar to my page name but it adds a /#/ at the beginning. I've had a look through the documentation but can't work out how to remove it.

My codes attached to a click event like so:

thisurl = "/portfolio";
$.address.path(thisurl);

Thanks in advance.

Was it helpful?

Solution 3

I decided to go with history.js to this .

Use History.pushState("", "Title", newstate); to change the addr bar and History.Adapter.bind(window, 'statechange', function () {}); For the back and forward button events .

OTHER TIPS

If you want to redirect somewhere you should use

thisurl = "/portfolio";
$(document).location = thisurl;

But if you only want to set a placeholder for your javascript app, I don't think you can do it without the /#/

Chk out http://keithpitt.com/post/2826790132/jquery-address-ruby-on-rails-and-will-paginate!
By making use of the state changes, you can avoid hash-bangs.

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