Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ernestmarcinko/domini
A minimalistic HTML document manipulation and traversal javascript library using a jQuery-like syntax.
https://github.com/ernestmarcinko/domini
dom dom-manipulation dom-manipulations dom-traversal ecmascript6 es6 html jquery minimalistic xhr xhr-requests
Last synced: 2 months ago
JSON representation
A minimalistic HTML document manipulation and traversal javascript library using a jQuery-like syntax.
- Host: GitHub
- URL: https://github.com/ernestmarcinko/domini
- Owner: ernestmarcinko
- Created: 2023-05-31T17:24:39.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-07-12T11:06:00.000Z (7 months ago)
- Last Synced: 2024-11-14T15:49:02.990Z (2 months ago)
- Topics: dom, dom-manipulation, dom-manipulations, dom-traversal, ecmascript6, es6, html, jquery, minimalistic, xhr, xhr-requests
- Language: JavaScript
- Homepage: https://dominijs.com/
- Size: 174 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# [DoMini](https://dominijs.com) · ![npm](https://img.shields.io/npm/v/domini) ![npm](https://img.shields.io/npm/dy/domini) ![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)
A minimalistic HTML document manipulation and traversal tool. Syntactically indentical to jQuery, but much smaller with only the essential features.
Check out the [documentation](https://dominijs.com) for all the features.
## Installation
Use npm or yarn to install DoMini with a single command```shell
# with npm
npm i domini --save-dev# with yarn
yarn add domini
```### In code
Complete library:
```javascript
import DoMini from domini;DoMini(function($){
//.. do your thing
});
```Core and optional modules:
```javascript
import "domini/dist/domini-core";
import "domini/dist/domini-animate";
import "domini/dist/domini-highlight";
import "domini/dist/domini-serialize";
import "domini/dist/domini-viewport";
import "domini/dist/domini-xhttp";DoMini(function($){
//.. do your thing
});
```## Via CDN
If you prefer a build, use the CDN version (all features)
```html
```
..or individually (core + modules):
```html
// You can optionally load more modules after the core if you need them:
```
## Sample Usage
DoMini loads itself to the ```DoMini``` variable in the global namespace.```javascript
// Similarly to jQuery
DoMini('#selector').text('Hi!');// If you prefer $
const $ = DoMini;
$('#selector').text('Hi!');// Or much better in a scope
(function($){
$('#selector').text('Hi!');
})(DoMini);// Fires on DOMContentLoaded or immediately if DOMContentLoaded was fired
DoMini(function($){
$('#selector').text('Hi!');
});
```