Created
November 1, 2011 07:30
-
-
Save justinpeterman/1330097 to your computer and use it in GitHub Desktop.
tabs
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
new joContainer([ | |
tabContent = new joContainer([ | |
new joTitle("Hello from tab1").setStyle({ | |
display: 'none' | |
}), new joTitle("Hello from tab2").setStyle({ | |
display: 'none' | |
})]), | |
new joFlexrow( | |
new joOption(["Video Info", "Related Videos", ]).selectEvent.subscribe(function (value) { | |
for (i in tabContent.data) { | |
tabContent.data[i].setStyle({ | |
display: 'none' | |
}); | |
} | |
tabContent.data[value].setStyle({ | |
display: 'block' | |
}); | |
})) | |
]), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a fine approach, though you might want to use joStack to push/pop views in which correspond to each "tab".