πŸ—’οΈDocs

THESE DOCS ARE NOT COMPLETE!

Methods

The elem parameter is a parameter used by almost all of the quick.js methods, and takes either a querySelector ("#editMe", ".className", "p", etc) or an Element object ("document.getElementById()", "document.getElementByClassName()", "_.get()", etc)

get()

Gets an element using a querySelector and returns an Element object. Usage: _.get(elem)

Example:

<p id="editme"></p>
<script>
    var elem = _.get("#editme")
    _.edit(elem, "hello there")
</script>

edit()

Edits an element's innerHTML

Usage: .edit(elem, text)

Parameters:

text accepts any string or number

Example:

addClass()

Add a class to an element.

Usage: .addClass(elem, property, value)

Parameters:

property takes a CSS property

value takes a value that works with property

Example:

removeClass()

Removes a class from an element

Usage: _.removeClass(elem, classname)

Parameters:

classname takes a name of an element class

Example:

setCSS()

Removes a class from an element

Usage: _.setCSS(elem, property, value)

Parameters:

property takes the name of a CSS class

value takes a valid CSS value of property

Example:

on()

Add an event listener to an element

Usage: _.on(elem, event, callback)

Parameters:

event takes any HTML event

callback takes any callback function

Example:

hide()

Hide an element on the document.

Usage: .hide(elem)

Example:

show()

Show an element.

Usage: .show(elem)

Example:

loop()

Loop a function an amount of times

Usage: .loop(times, function)

Parameters:

times takes an integer

function takes any JavaScript function

Example:

Last updated