jqlmodule
v3.4.0
Published
A JQuery alike es20xx module
Downloads
305
Maintainers
Readme
JQL
This module (JQueryLike) was inspired by the idea that some JQuery was too good to ditch.
It is developed in a modular fashion and uses plain ES20xx, so not really (or really not, take your pick) suitable for older browsers.
The module was rewritten in 2023 in a classfree object oriented fashion, inspired by a Douglas Crockford presentation. The objective is to not use prototype
and this
anywhere in the code.
Install/Import/Initialize
NPM
You can install this module using npm
npm i jqlmodule
There are two flavors of this library. One for scripts with type module
(or projects with "type": "module"
in package.json) and one for the browser.
For each flavor, the script is (bundled and) minified. The location of the minified scripts is https://kooiinc.github.io/JQL/Bundle
ESM import
import $ from "https://kooiinc.github.io/JQL/Bundle/jql.min.js";
// or
const $ = ( await
import("https://kooiinc.github.io/JQL/Bundle/jql.min.js")
).default;
$.div(`Hello JQL!`);
// ...
Browser script
<script src="https://kooiinc.github.io/JQL/Bundle/jql.browser.min.js"></script>
<script>
const $ = JQL.default;
// optionally delete from global namespace
delete window.JQL;
$.div(`Hello JQL!`);
// ...
</script>
Documentation
Documentation can be found @kooiinc.github.io/JQL/Docs/.
Demo and test
A test and demo of this module can be found @kooiinc.github.io/JQL/TestNDemo.