Created
March 31, 2009 06:20
-
-
Save keithpitty/88084 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
getInitialTab : function() { | |
var active = $$(".active-tab"); | |
if(active.length) { | |
return active.first().down(); | |
} else { | |
if(document.location.href.match(/#(\w.+)/)) { | |
var loc = RegExp.$1; | |
var elm = this.menu.find(function(value) { return value.href.match(/#(\w.+)/)[1] == loc; }); | |
return elm || this.menu.first(); | |
} else { | |
return this.menu.first(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment