====== Advanced Syntax ====== Entourage Expressions also feature a few modifiers/keywords for creating more advanced expressions. Documentation on those features is included below. ==== Compound Conditions ==== It is also possible to listen for multiple conditions in a single expression. This is accomplished using the ''or'' keyword - expressions can follow the pattern ''on [condition] then [action] or [condition2] then [action2]''. An example of using compound conditions is found below: **Live Example**
I will highlight on a mouseover OR explode on a click!
**Source Code**
I will highlight on a mouseover OR explode on a click!
==== Compound Actions ==== You can declare multiple actions for a condition by using the ''and'' keyword. The following shows a simple example of using ''and'' to execute multiple actions. **Live Example**
**Source Code**
==== Delayed Actions ==== You can delay the execution of an action for a period of time using the ''after'' keyword. The period of time specified defaults to milliseconds, but you can use seconds by appending a ''s'' to the end of the number specified in the action. **Live Example**
**Source Code**
==== Conditional Actions ==== You can execute actions conditionally in a variety of ways. Using the ''else'' keyword, you can specify an action to take place if a condition evaluates to false. ''else'' actions are ignored if the condition used does not return a true or false, as in ''click'' or ''mouseover''. **Live Example**
Darth Vader is the father of _______ Skywalker.
Type in and check your answer...
**Source Code**
Darth Vader is the father of _______ Skywalker.
Type in and check your answer...
You can also execute an action (or not) based on a JavaScript expression, using a combination of the keyword ''if'' followed by a JavaScript expression that returns true or false wrapped in ''expr[]''. Let's look at an example of this: **Live Example**
Waiting...
**Source Code**
Waiting...