This version is old school.
Please find jQuery plugins on npm.
Adding if(), else() and fi() methods
by Vegard Løkken
Extending jQuery chains with if(), else() and fi() methods to make it easier to write clean and readable code. It supports nesting.