Created
February 19, 2010 21:23
-
-
Save apipkin/309232 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
_switch : function(o){ | |
try { | |
Y.log(64); | |
_scrollAnimation.stop(); | |
Y.log(66); | |
}catch(e){ | |
// do nothing | |
} | |
var group = window.location.hash || this._switchCookie() || '#components'; | |
if(o != undefined) { | |
var group = o.get('href'); | |
}else{ | |
if(group.indexOf('#') < 0) { | |
group = '#' + group; | |
} | |
o = Y.one('#componentGroups a[href=' + group + ']'); | |
} | |
group = group.substring(group.lastIndexOf('#') + 1); | |
Y.Cookie.set('MenuSwitch', group, { path: BASE_URL , expires: new Date("January 12, 2025")}); | |
Y.all('#componentGroups li').removeClass('selected'); | |
if(o != undefined) { | |
o.ancestor('li').addClass('selected'); | |
} | |
if(Y.one('#scrollBody > div#' + group)) { | |
Y.all('#scrollBody > div').setStyle('display','none'); | |
Y.one('#scrollBody > div#' + group).setStyle('display',''); | |
}else{ | |
Y.all('#scrollBody > div').setStyle('display',''); | |
} | |
this._scrollBodyUpdate(); | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment