## Quantdom **Kind**: global class * [Quantdom](#Quantdom) * [.each(handler)](#Quantdom+each) * [.exists()](#Quantdom+exists) ⇒ boolean * [.parent()](#Quantdom+parent) ⇒ [Quantdom](#Quantdom) * [.siblings()](#Quantdom+siblings) ⇒ [Quantdom](#Quantdom) * [.children()](#Quantdom+children) ⇒ [Quantdom](#Quantdom) * [.find([selector])](#Quantdom+find) ⇒ [Quantdom](#Quantdom) * [.findEl([selector])](#Quantdom+findEl) ⇒ HTMLElement * [.findEls([selector])](#Quantdom+findEls) ⇒ Nodelist * [.el([index])](#Quantdom+el) ⇒ HTMLElement * [.lastEl()](#Quantdom+lastEl) ⇒ HTMLElement * [.els()](#Quantdom+els) ⇒ Nodelist * [.on(event, listener)](#Quantdom+on) * [.off(event, listener)](#Quantdom+off) * [.append(html)](#Quantdom+append) * [.prepend(html)](#Quantdom+prepend) * [.before(html)](#Quantdom+before) * [.after(html)](#Quantdom+after) * [.attr(attr, value)](#Quantdom+attr) ⇒ string * [.hide([aria])](#Quantdom+hide) * [.show([aria])](#Quantdom+show) * [.html([html])](#Quantdom+html) ⇒ string * [.text([newValue])](#Quantdom+text) ⇒ string * [.val([newValue])](#Quantdom+val) ⇒ \* * [.addClass(className)](#Quantdom+addClass) * [.removeClass(className)](#Quantdom+removeClass) * [.toggleClass(className)](#Quantdom+toggleClass) * [.css(prop, [value])](#Quantdom+css) ⇒ * [.docReady(cb)](#Quantdom+docReady) ### quantdom.each(handler) executes a function on each iteration on the list of elements. **Kind**: instance method of [Quantdom](#Quantdom) | Param | Type | Description | | --- | --- | --- | | handler | function | A function to run on each iteration | ### quantdom.exists() ⇒ boolean checks if element exists by checking the elements nodelist length & is an alias for exists i.e. $('.selector').exists **Kind**: instance method of [Quantdom](#Quantdom) **Returns**: boolean - returns true if element exists ### quantdom.parent() ⇒ [Quantdom](#Quantdom) returns the parent of the first element that matches the selector **Kind**: instance method of [Quantdom](#Quantdom) **Returns**: [Quantdom](#Quantdom) - Returns parent of first element that matches the selector ### quantdom.siblings() ⇒ [Quantdom](#Quantdom) returns the siblings of the first element that matches the selector **Kind**: instance method of [Quantdom](#Quantdom) **Returns**: [Quantdom](#Quantdom) - Returns siblings of first element that matches the selector ### quantdom.children() ⇒ [Quantdom](#Quantdom) returns the children of the first element that matches the selector **Kind**: instance method of [Quantdom](#Quantdom) **Returns**: [Quantdom](#Quantdom) - Returns children of first element that matches the selector ### quantdom.find([selector]) ⇒ [Quantdom](#Quantdom) returns the first element that matches the selector in children of the selected node **Kind**: instance method of [Quantdom](#Quantdom) **Returns**: [Quantdom](#Quantdom) - returns first element that matches the selector | Param | Type | Description | | --- | --- | --- | | [selector] | string | query selector to search for | ### quantdom.findEl([selector]) ⇒ HTMLElement returns first element that matches the selector in children of the selected node **Kind**: instance method of [Quantdom](#Quantdom) **Returns**: HTMLElement - returns first element that matches the selector | Param | Type | Description | | --- | --- | --- | | [selector] | string | query selector to search for | ### quantdom.findEls([selector]) ⇒ Nodelist returns elements that matches the selector in children of the selected node **Kind**: instance method of [Quantdom](#Quantdom) **Returns**: Nodelist - returns nodelist of that matches the selector | Param | Type | Description | | --- | --- | --- | | [selector] | string | query selector to search for | ### quantdom.el([index]) ⇒ HTMLElement returns first element in an array of elements with same selector, acts like document.querySelector **Kind**: instance method of [Quantdom](#Quantdom) **Returns**: HTMLElement - an element in the array of elements you want to use | Param | Type | Description | | --- | --- | --- | | [index] | integer | index of element to return | ### quantdom.lastEl() ⇒ HTMLElement returns last element in an array of elements with same selector **Kind**: instance method of [Quantdom](#Quantdom) **Returns**: HTMLElement - last element in array of elements you want to use ### quantdom.els() ⇒ Nodelist returns all matching elements, alias for querySelectorAll **Kind**: instance method of [Quantdom](#Quantdom) **Returns**: Nodelist - a nodelists ### quantdom.on(event, listener) adds an event on an element(s) **Kind**: instance method of [Quantdom](#Quantdom) | Param | Type | Description | | --- | --- | --- | | event | string | type of event to add to element | | listener | function | event listener function to execute on event | ### quantdom.off(event, listener) removes an event on an element(s) **Kind**: instance method of [Quantdom](#Quantdom) | Param | Type | Description | | --- | --- | --- | | event | string | type of event to add to element | | listener | function | event listener function to remove | ### quantdom.append(html) Appends an html string to a dom element(s) **Kind**: instance method of [Quantdom](#Quantdom) | Param | Type | Description | | --- | --- | --- | | html | string | html string to append to DOM | ### quantdom.prepend(html) prepends a html string to a dom element(s) **Kind**: instance method of [Quantdom](#Quantdom) | Param | Type | Description | | --- | --- | --- | | html | string | string of html to prepend | ### quantdom.before(html) inserts a html string to dom right before element(s) **Kind**: instance method of [Quantdom](#Quantdom) | Param | Type | Description | | --- | --- | --- | | html | string | string of html to prepend | ### quantdom.after(html) inserts a html string to dom right after element(s) **Kind**: instance method of [Quantdom](#Quantdom) | Param | Type | Description | | --- | --- | --- | | html | string | string of html to prepend | ### quantdom.attr(attr, value) ⇒ string sets an element(s) attribute or returns first element attribute value **Kind**: instance method of [Quantdom](#Quantdom) **Returns**: string - value of first occurrence of element attribute | Param | Type | Description | | --- | --- | --- | | attr | string | an attribute | | value | any | a value to set attribute | ### quantdom.hide([aria]) adds display none from css inline styles **Kind**: instance method of [Quantdom](#Quantdom) | Param | Type | Description | | --- | --- | --- | | [aria] | boolean | if true sets ara-hidden to true instead of setting inline display style to none | ### quantdom.show([aria]) removes display none from and element(s) css inline styles **Kind**: instance method of [Quantdom](#Quantdom) | Param | Type | Description | | --- | --- | --- | | [aria] | boolean | if true sets ara-hidden to false instead of removing inline display style | ### quantdom.html([html]) ⇒ string inserts/replaces html or returns html of an element(s) **Kind**: instance method of [Quantdom](#Quantdom) **Returns**: string - html of first occurrence of element | Param | Type | Description | | --- | --- | --- | | [html] | string | html to insert into dom | ### quantdom.text([newValue]) ⇒ string inserts/replaces text or returns text of an element(s) **Kind**: instance method of [Quantdom](#Quantdom) **Returns**: string - text of first occurrence of element | Param | Type | Description | | --- | --- | --- | | [newValue] | string | text to insert into dom | ### quantdom.val([newValue]) ⇒ \* gets a value of first html element or sets a new value of all HTML Element(s) **Kind**: instance method of [Quantdom](#Quantdom) **Returns**: \* - value of first occurrence of element | Param | Type | Description | | --- | --- | --- | | [newValue] | \* | a new value to set | ### quantdom.addClass(className) adds a class to the selected element(s) **Kind**: instance method of [Quantdom](#Quantdom) | Param | Type | | --- | --- | | className | string | ### quantdom.removeClass(className) removes a class from the selected element(s) **Kind**: instance method of [Quantdom](#Quantdom) | Param | Type | | --- | --- | | className | string | ### quantdom.toggleClass(className) toggles a class on selected element(s) **Kind**: instance method of [Quantdom](#Quantdom) | Param | Type | | --- | --- | | className | string | ### quantdom.css(prop, [value]) ⇒ sets a style on element(s) or returns the style property value **Kind**: instance method of [Quantdom](#Quantdom) **Returns**: computed style of element | Param | Type | Description | | --- | --- | --- | | prop | string | css property to get or set | | [value] | \* | value to set styles | ### quantdom.docReady(cb) wrapper to run code that needs to wait for DOM to be fully loaded **Kind**: instance method of [Quantdom](#Quantdom) | Param | Type | Description | | --- | --- | --- | | cb | callback | a callback to run once the DOM is ready |