Created
July 18, 2013 15:50
-
-
Save dustintheweb/6030460 to your computer and use it in GitHub Desktop.
Ternary (Conditional) Operator and Style. Useful for rendering an inline if statement
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
// Psuedo: | |
(some_condition) ? do_something_simple : do_something_else; | |
// Example within an API | |
$('.featured-carousel .carousel').carouFredSel({ | |
scroll: { | |
fx: ($('html').hasClass('ie8'))?'scroll':'crossfade' | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment