A lightweight, zero-dependency DOM manipulation library with jQuery-like syntax.
- Lightweight: Only ~1KB (~0.5KB minified)
- Zero dependencies: Works out of the box
- jQuery-like syntax: Familiar API for developers
- Modern JavaScript: Uses ES6+ features
- TypeScript support: Includes type definitions
npm install microquery.js
import $ from 'microquery.js';
// Select elements and attach event listeners
const element = $('selector');
element.on('click', (event) => {
console.log('Element clicked!');
});
// Remove event listeners
element.off('click');
// Manipulate DOM
element.empty(); // Clear content
element.remove(); // Remove elementSelects elements from the DOM and returns a wrapper object with additional methods.
Attach an event listener to the selected element.
Remove event listeners from the selected element. If no event is specified, removes all listeners.
Clear the content of the selected element.
Remove the selected element from the DOM.
MIT