asual / jquery-address

jQuery Address - Deep linking for the masses
http://www.asual.com/jquery/address
GNU General Public License v2.0
813 stars 172 forks source link

How to remove '#' before hash url #175

Open honeypc opened 11 years ago

honeypc commented 11 years ago

ex: http://localhost:15840/product/list#/?page=2 I want my url display same: http://localhost:15840/product/list/?page=2 Thanks

lupetalo commented 11 years ago

+1 to this

trusktr commented 11 years ago

Go look at the History API (e.g. history.pushState). You'll have to do it on your own. jquery-address (AFAIK) is meant to be used with a hash only (#).

jagc commented 11 years ago

This should answer your question:

$('a').address(function() { return $(this).attr('href').replace(/^#/, ''); });

RTakes commented 10 years ago

I had the same issue and solved it by using the $.address.state(value). For example $.address.state('product/list').

From the documentation $.address.state(value) Returns: jQuery Address Sets the base path of the website that is utilized in HTML5 state management.