Skip to content

NikolayGechev/dependjs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

depend.js

Depend.js add behavior directly into html input element via attribue and logical statement into.

Can be compoused large and complex graph of dependencyes.

The only think is that graph have to be Directed Acyclic Graph

Depend.js focuses to the most commonly used element states of an input form.

Show/Hide, Enabled/Disabled, Optional/Required.

Simple logic into attribute 'depend' include include next elements which deinining the behavior of the element:

  1. Functions - "show->[]", "hide->[]", "enabled->[]", "disabled->[]", "optional->[]", "required→[]".

  2. Delimiter between the functions - ",".

  3. Logical Operators - "(", ")", "&&", "||", "!".

  4. CSS Selectors.

Syntax example:

enabled->[input[name=checkbox1] && ! input[name=checkbox2] && input[name=checkbox3]], optional->[input[name=checkbox2]]

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published