Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/sh20raj/queryx

QueryX is a lightweight JavaScript library that provides a jQuery-like interface for DOM manipulation and traversal. It allows you to select elements, add/remove classes, manipulate attributes, traverse the DOM, and more, similar to jQuery but in a simpler and more lightweight manner.
https://github.com/sh20raj/queryx

dom-manipulation javascript jquery jquery-alternative sh20raj

Last synced: about 2 months ago
JSON representation

QueryX is a lightweight JavaScript library that provides a jQuery-like interface for DOM manipulation and traversal. It allows you to select elements, add/remove classes, manipulate attributes, traverse the DOM, and more, similar to jQuery but in a simpler and more lightweight manner.

Awesome Lists containing this project

README

        

# QueryX

[![GitHub license](https://img.shields.io/github/license/SH20RAJ/QueryX.svg?)](https://github.com/SH20RAJ/QueryX/blob/main/LICENSE)
[![GitHub issues](https://img.shields.io/github/issues/SH20RAJ/QueryX.svg)](https://github.com/SH20RAJ/QueryX/issues)
[![GitHub stars](https://img.shields.io/github/stars/SH20RAJ/QueryX.svg)](https://github.com/SH20RAJ/QueryX/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/SH20RAJ/QueryX.svg)](https://github.com/SH20RAJ/QueryX/network)

QueryX is a lightweight JavaScript library that provides a jQuery-like interface for DOM manipulation and traversal. It allows you to select elements, add/remove classes, manipulate attributes, traverse the DOM, and more, similar to jQuery but in a simpler and more lightweight manner.

[Dev.to
](https://dev.to/sh20raj/queryx-a-lightweight-javascript-library-for-dom-manipulation-3hic)
## Features

- **DOM Selection:** Select elements from the DOM using CSS selectors.
- **DOM Manipulation:** Add, remove, and modify elements and their attributes.
- **Event Handling:** Attach and detach event handlers to elements.
- **DOM Traversal:** Traverse the DOM tree with ease.
- **Chaining:** Chain multiple operations together for cleaner code.

## Getting Started

To get started with QueryX, include the `queryX.js` file in your project:

```html

```

Alternatively, you can use a CDN link:

```html

```
or
```html

```

## Usage

```javascript
// Example Usage
queryX('button').on('click', function() {
queryX(this).toggleClass('active');
});

queryX('.container').append('

New Element
');

var formData = queryX('form').serialize();
console.log(formData);

queryX('.parent').children().addClass('child-element');

queryX('.element').closest('.container').css('background-color', 'red');
```

## Documentation

For detailed documentation and examples, please refer to the [Documentation](./docs/) section (link to your documentation).

## Contributing

Contributions are welcome! If you have any suggestions, bug reports, or feature requests, please open an issue or submit a pull request.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

---

[![Visitors](https://api.visitorbadge.io/api/visitors?path=https%3A%2F%2Fgithub.com%2FSH20RAJ%2FQueryX%2F&labelColor=%23f47373&countColor=%23dce775&style=flat)](https://visitorbadge.io/status?path=https%3A%2F%2Fgithub.com%2FSH20RAJ%2FQueryX%2F)