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: 7 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.
- Host: GitHub
- URL: https://github.com/sh20raj/queryx
- Owner: SH20RAJ
- License: mit
- Created: 2024-03-31T12:50:15.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-03T12:33:57.000Z (over 1 year ago)
- Last Synced: 2024-12-02T10:48:30.950Z (8 months ago)
- Topics: dom-manipulation, javascript, jquery, jquery-alternative, sh20raj
- Language: JavaScript
- Homepage: https://sh20raj.github.io/QueryX/
- Size: 20.5 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# QueryX
[](https://github.com/SH20RAJ/QueryX/blob/main/LICENSE)
[](https://github.com/SH20RAJ/QueryX/issues)
[](https://github.com/SH20RAJ/QueryX/stargazers)
[](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.
---
[](https://visitorbadge.io/status?path=https%3A%2F%2Fgithub.com%2FSH20RAJ%2FQueryX%2F)