JQuery address, parameter change? (deep binding)

I am using jQuery Address to do deep binding on ajax site.

I have a few arguments like this: /SomeController/SomeAction#/586?e=5808&tab=#First

Q1: How to change only the "tab" parameter?
When I do it like this ...

 $("#tabs").bind("tabsselect", function(event, ui) { $.address.parameter("tab", ui.tab.hash); } 

.. result: /SomeController/SomeAction#/586?e=5808&tab=#First#Third
instead of the desired: /SomeController/SomeAction#/586?e=5808&tab=#Third

In the case when other parameters in the url hash should be considered unknown and should remain as they are.

Q2: How to remove a parameter from a URL hash?
As above, but if I want to completely remove the tab option.

Thanks!

+4
source share
2 answers

The specified link has an example tabs

http://www.asual.com/jquery/address/samples/tabs/#Overview

You can track the code with firebug. It looks clean.

+1
source

I know this is a very old question, but id thought still answers.

You must first set the null parameter to remove it, and then assign a new value:

 $.address.parameter('tab', null) $.address.parameter('tab', ui.tab.hash) 
0
source

All Articles