The if Command

Syntax

  if <conditional> [then] <command-list> [(else | otherwise) <command-list>] end`

Description

The if command provides the standard if-statement control flow.

Note that a leading if on a separate line from an else statement will be treated as a nested if within the else:

...
else
  if false   -- does not bind to the else on the previous line as an "else if"
    log 'foo'
  end
  log 'bar'
end

Examples

<div
  _="on click if I do not match .disabled
                   add .clicked"
>
  Click Me!
</div>