Good Day,
I am working with jQuery tabs and I've got some code that fires off when I change tabs.
$('#container-1').tabs({ onClick: function(clickedTab, divElement, hiddenTab) {
var selectedTab = clickedTab.toString();
// var pos = selectedTab.IndexOf("#") + 1;
var results = selectedTab.substring(5);
// selectedTab.IndexOf("#") + 1
alert(results);
}
});
I've commented out the offending code, but when I try to determine the position of the # character, I get an error:
Object http://www.omnicom-innovations.com/play/tabsdemo1.html#fragment-2 has no method 'IndexOf'
I was under the imporession that by using the toString() method, it would convert the object to a string. This is based off of my understanding of a similar post:
http://stackoverflow.com/questions/3542843/jquery-and-split-not-working-together
If anyone can point out what's wrong, I'd greatly appreciate it.
TIA,
coson