With modern browsers the need for jquery is gone.
http://youmightnotneedjquery.com/
https://tobiasahlin.com/blog/move-from-jquery-to-vanilla-javascript/#selecting-elements
So it should be removed to reduce the footprint.
Especially as the next Bootstrap Release does not depend on jQuery anymore.
// jquery
item.find(".sieve-settings-port").text(account.port);
// vanilla.js
elm.querySelector(".sieve-settings-port")
.textContent = account.port;
// jquery
item.find(".sieve-account-delete-server").click(() => { this.remove(); });
// vanilla.js
elm.querySelector(".sieve-account-delete-server")
.addEventListener("click", () => { this.remove(); });
// jquery
$("#something").remove()
// vanilla.js
const elm = elm.querySelector("#something")
elm.parentNode.removeChild(elm);
// jquery
$(`#siv-account-${this.id} .siv-tpl-scripts`)
.empty()
.append(item);
// vanilla.js
const scripts = document.querySelector(`#siv-account-${this.id} .siv-tpl-scripts`);
while (scripts.firstChild)
scripts.removeChild(scripts.firstChild);
scripts.appendChild(item);
//jquery
parent.find(".siv-settings-advanced").show();
// vanilla.js
parent.querySelector(".siv-settings-advanced").style.display = "";
//jquery
parent.find(".siv-settings-advanced").hide();
// vanilla.js
parent.querySelector(".siv-settings-advanced").style.display = "none";
// jquery
item.replaceWith(this.html(true));
// vanilla.js
item.parent.replaceChild(this.html(true), item);
With modern browsers the need for jquery is gone.
http://youmightnotneedjquery.com/
https://tobiasahlin.com/blog/move-from-jquery-to-vanilla-javascript/#selecting-elements
So it should be removed to reduce the footprint.
Especially as the next Bootstrap Release does not depend on jQuery anymore.
.text()with.textContent.click()handlers with.addEventListener().remove().empty().show().hide()replace
.find()Replace templateloader.load with templateloader.replace(id,url) and templateloader.append(id,url)
replace
.replaceWith()