When using the jQuery BBQ plugin, is there a way to make the getState() method ignore case?

713 Views Asked by At

I am using the jQuery BBQ plugin: http://benalman.com/projects/jquery-bbq-plugin/

It has been pretty awesome, however when calling $.bbq.getState(); case seems to be important.

For instance, consider the following URL: http://mysite.com/#someVar=someValue.

If I call $.bbq.getState('someVar'); I am able to retrieve the value of the query string variable, but if I call $.bbq.getState('somevar'); (with a lowercase v) the value is undefined.

I can build the URL using a constant value that will always write it in the correct case, but I am thinking of the scenario where a user may type the URL out. If they type the wrong case, the $.bbq.getState() method will tell me that the 'someVar' value is not part of the URL.

So I am wondering ... Is there a way to tell $.bbq.getState() to be case insensitive?

0

There are 0 best solutions below