Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nazmul-nhb/tiny-query-dom

TinyQuery - A lightweight and modern JavaScript library for minimal DOM manipulation and event handling, inspired by jQuery.
https://github.com/nazmul-nhb/tiny-query-dom

dom dom-manipulation miniquery selector

Last synced: 2 months ago
JSON representation

TinyQuery - A lightweight and modern JavaScript library for minimal DOM manipulation and event handling, inspired by jQuery.

Awesome Lists containing this project

README

        

# TinyQuery

A lightweight and modern JavaScript library for DOM manipulation and event handling, inspired by jQuery.

## Installation

```bash
npm install tiny-query-dom
```

```javascript
import { $ } from 'tiny-query-dom';

$("#test").on("click", () => {
$("#subject")
.toggle()
.css({ color: "red", font: "32px bold" })
.text("No Subject!");
});

```

## Features

- DOM Manipulation: text(), html(), val(), append(), prepend()
- Event Handling: on(), off(), trigger(), click()
- CSS Manipulation: css(), addClass(), removeClass(), toggleClass()
- Traversing: parent(), children()
- Form Handling: serialize()
- Chaining Methods
- Utility Functions: each()