Note
The listening to - and handling of events has been overhauled. This means that
callbacks for event listeners now are always expected to have the
signature[handler]({evt, [me|self]}). If you use [JQx].delegate or
[JQx instance].on in your code, please review.
See also documentation
This module was inspired by the idea that some parts of JQuery are too good to ditch. JQx is not a replacement for JQuery. Consider it a set of JQuery alike ES/JS-methods to programmatically create, retrieve, modify, style and/or manipulate (collections of) HTML elements in a HTML document.
The code is written in a modular fashion and uses plain ES20xx, so not really (or really not, take your pick) suitable for older browsers.
- Documentation can be found @Codeberg or @Github.
- A test and demo of this module can be found @Codeberg or @Github.
You can install this module from npm (package jqx-es). To create a HTML tree (DOM Object) server side you need a library like jsdom.
npm i jqx-es
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.codeberg.page/JQx/Bundle
import $ from "https://kooiinc.codeberg.page/JQx/Bundle/jqx.min.js";
// or
const $ = ( await
import("https://kooiinc.codeberg.page/JQx/Bundle/jqx.min.js")
).default;
$.div(`Hello JQx!`).appendTo(document.body);
// ...<script src="https://kooiinc.codeberg.page/JQx/Bundle/jqx.browser.min.js"></script>
<script>
const $ = JQx.default;
$.div(`Hello JQx!`).appendTo(document.body);
// ...
</script>Note
This repository was formerly known as JQL, residing on Github. The authorative code base for this module is now: @https://codeberg.org/KooiInc/JQx.
The NPM package is copied to a new package (see top link). The old NPM package will not be updated and discontinued in due time.
The latest JQL Github branch before this operation is preserved in ./Resource/JQL-last.
The Github JQL repository is renamed to JQx.
The CodeBerg repository will, until further notice, be synchronised to the Github repository.