1.0.1 • Published 3 years ago

seleqtor v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

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