jessquery
Version:
Modern JavaScript is pretty good, but typing document.querySelector() is a pain. This is a tiny library that makes DOM manipulation easy. jQuery is around 80kb (30kb gzipped), while this is only around 8kb (3.5kb gzipped). Lots of JSDoc comments so it's s
25 lines (22 loc) • 683 B
HTML
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Test Next Method</title>
</head>
<body>
<button id="btn1">Button 1</button>
<button id="btn2">Button 2</button>
<button id="btn3">Button 3</button>
<script type="module">
import { $, $$ } from "../index.js"
const buttons = $$("button")
buttons.fromHTML("http://localhost:5500/tests/playground.html", {
onSuccess: () => $("body").attach("<h1>It worked!</h1>"),
runScripts: true,
sanitize: false,
})
</script>
</body>
</html>