There are no tracking or monitoring cookies on this site. There are only cookies used for documentation examples related to cookies.Close
Processing...
This may take a few seconds.

Custom conditional functions

Let's say you're coding away, and then the next thing is to run an event based on circumstances not covered by existing conditional functions. How would you do that in Active CSS?

You could either call out to an external function, using the if-func command, or you could create an Active CSS conditional function. You could set up optional parameters for that conditional function, and then use the function when you need to in event selectors.

Writing your own conditional function

Use the create-conditional for creating conditional functions. This is more exciting than doing it in a JavaScript function, but it will require more work to get familiar on how to do it.

Calling an external JavaScript function

See the if-func command on how to run an external function. This function should always be set up to return true or false.