conditionize2. A jQuery plugin for conditioning things

Different input types

Inputs

Reference by id:

You just typed 'one'!

Reference by name:

You just typed 'two'

Input with initial value:

You just typed 'three'

Space and non-ASCII chars at the condition

Wow! Even non-ASCII chars are ok!

Multivalue input

You read too much:)

Checkboxes

Reference by id:

Wow! You just checked me!

Reference by name:

Wow! You just checked me!

Checkbox with value attribute:

Wow! You just checked me!

Initially checked checkbox:

I was here initially or you just checked me:)

Negative condition

Check it if you want me to disappear

Multivalue checkbox:

You checked option2! I saw it!

Selects

Reference by id:

Nice choice!

Reference by name:

Makes sense!

Select with initial value:

Toggle me

Select with multiple attribute:

Don't you tiered of 'two's?

Radio buttons

Reference by name

:)

Radio button with an inital value

So bad at math?

Combined/nested

You can even nest the conditional sections:

Both are checked and 'foo' is typed.

names/ids parsing

Overlapping names

Partially equal names

The first one is 'foo'

The second one is 'foo'

Partially equal ids

The first one is 'foo'

The second one is 'foo'

Allowed symbols support

Allowed symbols in name

Works!

Allowed symbols in id

Works!

Complicated conditions

No space and no parentheses

Use functions

Wow! Too mush!

Combine many inputs



You are whether tired or know some math:)

Array functions

You wrote three movies.

I like Zootopia too.

More than one movie. Not bad.

Customize options

Update events

Set an event for conditions update by string

Works with keyup!

Set an event for conditions update by string

Works with keyup array!

Many events

Works with many events in one string!

Custom event

This one will be updated only after the button click!

Do not update on load

This one is ignored on page load, but it works if you toggle the checkbox.

Customize actions: custom & ignore

Custom actions

This text will not be affected.

Ingnore ifTrue actions

This will alert only on uncheck and ignore check.

Ingnore ifFalse actions

This will alert only on check and ignore uncheck.

Customize actions: build-in actions

show and hide

Show if true, hide if false

Hide if false, show if true

Clear fields

Check the checkbox to clear all fields

Combine clear and hide

Check the checkbox to clear the input and hide it

Trigger events

Customize actions: mixing build-in with custom

Let's try something more sophisticated

This is a section with subsections

WoW!