QueryX

GitHub license GitHub issues GitHub stars GitHub forks

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

Features

Getting Started

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

<script src="path/to/queryX.js"></script>

Alternatively, you can use a CDN link:

<script src="https://cdn.jsdelivr.net/gh/SH20RAJ/QueryX@main/QueryX.js"></script>

or

<script src="https://cdn.jsdelivr.net/npm/queryxjs"></script>

Usage

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

queryX('.container').append('<div class="new-element">New Element</div>');

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 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 file for details.


Visitors