-
Notifications
You must be signed in to change notification settings - Fork 0
Selector class
Andrey Poprotsky edited this page Apr 22, 2019
·
4 revisions
Selector class functionality in evente is based on querySelectorAll function and Array class. If you are using jQuery note that some selectors are provided by jQuery extensions (see Links section below) but evente not supported them.
- Constructors constructor
- Working with classes addClass
- Working with attributes attr
-
CSSselector or array ofHTMLElementobjects or singleHTMLElementobject -
Selectorobject which is base for new object
Selector object
- String of
CSSclasses separated by space symbol or array of strings ofCSSclasses
this
- String contained attribute name
- New value of attribute (optional)
- Method called with only first parameter returns array of attribute's values or value of attribute if
Selectorobject contains only one element - Method called with both parameter returns
this
let inputs = new rl.Selector('input');or
let inputs = rl('input');or if you do not use jQuery
let inputs = $('input');also creates instance of Selector class.