Created
December 10, 2012 18:15
-
-
Save cbrunnkvist/4252246 to your computer and use it in GitHub Desktop.
Titanium Mobile: Branch in literal declaration
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
var Ti = {Platform:{osname:"android"}}; | |
var theme = { | |
fontFamily: { | |
iphone : 'Helvetica Neue', | |
android : 'Droid Sans' }[Ti.Platform.osname] | |
}; | |
document.body.appendChild(document.createTextNode(theme.fontFamily)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://codepen.io/cbrunnkvist/pen/bcnxr