- Since:
- 0.0.15
Methods
-
staticjMod.Element.addClass(el, className){Element}
F:/Projects/jMod/main/bin/jMod.full.js, line 2431 -
Add a class to a DOM Element
Name Type Description elElement DOM Element classNamestring Class name to add Returns:
Type Description Element The input element -
staticjMod.Element.addClasses(el, classNames){Element}
F:/Projects/jMod/main/bin/jMod.full.js, line 2445 -
Add multiple classes to a DOM Element
Name Type Description elElement DOM Element classNamesArray.<string> | string Class names to add Returns:
Type Description Element The input element -
staticjMod.Element.appendChild(el, data){Element}
F:/Projects/jMod/main/bin/jMod.full.js, line 2506 -
Append a child to a DOM Element. The input can be an a simple element or string. It can be an object containing Element information
createNewElement. Additionally, it can be an array of any of the preciously mentioned types.Name Type Description elElement DOM Element dataElement | object | string | * Child - See:
-
- createNewElement
Returns:
Type Description Element The input element -
staticjMod.Element.createNewElement(data){Element}
F:/Projects/jMod/main/bin/jMod.full.js, line 2597 -
Create a new DOM element
Name Type Description datajMod.Element.NewElementData Element information Returns:
Type Description Element The newly created element -
staticjMod.Element.hasClass(el, className){boolean}
F:/Projects/jMod/main/bin/jMod.full.js, line 2391 -
Check if a DOM element has a particular class
Name Type Description elElement DOM Element classNamestring Class to check for Returns:
Type Description boolean -
staticjMod.Element.hasClasses(el, classNames){Array.<string>}
F:/Projects/jMod/main/bin/jMod.full.js, line 2403 -
Check if a DOM element has one or more of the class names given as the second parameter
Name Type Description elElement DOM Element classNamesArray.<string> | string Class names to check for Returns:
Type Description Array.<string> Array of strings containing the matching classes -
staticjMod.Element.isElement(obj){boolean}
F:/Projects/jMod/main/bin/jMod.full.js, line 623 -
Check if input is a DOM element
Name Type Description obj* Input to be checked Returns:
Type Description boolean -
staticjMod.Element.missingClasses(el, classNames){Array.<string>}
F:/Projects/jMod/main/bin/jMod.full.js, line 2417 -
Check if a DOM element is missing one or more of the class names given as the second parameter
Name Type Description elElement DOM Element classNamesArray.<string> | string Class names to check for Returns:
Type Description Array.<string> Array of strings containing the missing class names -
staticjMod.Element.removeClass(el, className){Element}
F:/Projects/jMod/main/bin/jMod.full.js, line 2458 -
Remove a class from a DOM Element
Name Type Description elElement DOM Element classNamestring Class name to remove Returns:
Type Description Element The input element -
staticjMod.Element.removeClasses(el, classNames){Element}
F:/Projects/jMod/main/bin/jMod.full.js, line 2470 -
Remove multiple classes from a DOM Element
Name Type Description elElement DOM Element classNamesArray.<string> | string Class names to remove Returns:
Type Description Element The input element
Type Definitions
-
jMod.Element.NewElementCallbackDataObject
-
Data for event listeners when creating new elements
- See:
-
- createNewElement
Properties:
Name Type Argument Default Description callbackfunction Callback function captureboolean <optional>
false Use capture -
jMod.Element.NewElementDataObject
-
Data for creating a new element
- See:
-
- createNewElement
Properties:
Name Type Argument Description typestring The element type to be created (ex. div, h1, etc...) idstring <optional>
Element id classNamestring <optional>
Class name(s) classstring <optional>
Synonym for className stylestring <optional>
Style to be applied to the new element innerHTMLElement | Array.<Element> | string | Array.<string> | object | Array.<object> <optional>
Child element(s) to append to the new element textElement | Array.<Element> | string | Array.<string> | object | Array.<object> <optional>
Synonym for innerHTML attributesobject <optional>
Key-value list of attributes to be added to the new element EventListenersobject.<string, jMod.Element.NewElementCallbackData> <optional>
Key-value list of Events Names and Callback information to be added to the new element eventListenersobject <optional>
Synonym for EventListeners Eventsobject <optional>
Synonym for EventListeners eventsobject <optional>
Synonym for EventListeners Listenersobject <optional>
Synonym for EventListeners listenersobject <optional>
Synonym for EventListeners