You mean "verbose" here, probably?
You mean "verbose" here, probably?
---
document.querySelector('#sel').addEventListener('click', (e) => {})
Feels way more verbose than the following:
$('#sel').on('click', (e) => {})
My bad - apparently the coffee hadn't sunk in yet ha.
---
1. document.querySelectorAll(".sel").forEach((e) => e.addEventListener("click", (e) => {}))
$('.sel').on('click', (e) => {})
2. document.querySelector(".sel")?.addEventListener("click", (e) => {})
$('.sel').on('click', (e) => {})
3. const e = document.createElement("div") e.className = "cls" e.setAttribute("title", "Title") e.textContent = "<Content>"
const e = $('<div>').addClass("cls").attr("title", "Title").text("<Content>")
This approach seems the funniest: https://jsfiddle.net/eu60Lwv9/