Welcome to the documentation for 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.
You can include QueryX in your project by downloading the queryX.js
file and adding it to your project directory. Then include it in your HTML file:
<script src="path/to/queryX.js"></script>
Alternatively, you can use a CDN link:
<script src="https://cdn.jsdelivr.net/npm/queryx"></script>
You can select elements using CSS selectors:
// Select all buttons
queryX('button');
queryX('div').addClass('highlight');
queryX('.container').append('<div class="new-element">New Element</div>');
queryX('input').attr('disabled', true);
queryX('button').on('click', function() {
queryX(this).toggleClass('active');
});
queryX('.parent').children();
queryX('.element').closest('.container');
var formData = queryX('form').serialize();
console.log(formData);
For detailed information on all methods and properties available in QueryX, please refer to the API Reference.
Check out the Examples for some practical use cases and code snippets.
Contributions are welcome! If you have any suggestions, bug reports, or feature requests, please open an issue or submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.