seleqtor
v1.0.1
Published
Get a selector to a dom element
Downloads
1
Readme
Seleqtor
Seleqtor is a simple javascript function that generates a perfect selector a DOM element passed to it.
Function Definitiion
seleqtor(element: HTMLElement, closestId: Boolean);
The function takes two arguments,
- element - An HTMLElement that can be retrieved through
document.querySelector(".anything-here")
- closestId - A Boolean to specify whether the selector should be constructed from the closest ID to the HTMLElement provided.
This value defaults to
true