# Handbook for macros.js This handbook provides a detailed guide on using `macros.js` in your web projects. `macros.js` is a lightweight JavaScript library that simplifies common DOM manipulations and event handling, similar to jQuery, but with a modern and compact approach. It is designed to work directly in the browser without dependencies. ## Table of Contents 1. [Introduction](#introduction) 2. [Installation](#installation) 3. [DOM Selectors](#dom-selectors) 4. [DOM Manipulation](#dom-manipulation) 5. [Event Handling](#event-handling) 6. [Currency Formatting](#currency-formatting) 7. [Example Project](#example-project) 8. [Comparison with jQuery](#comparison-with-jquery) 9. [Best Practices](#best-practices) ## Introduction `macros.js` provides a set of helper functions and methods to select, manipulate, and manage events for DOM elements. It is a modern alternative to jQuery, focusing on simplicity and performance. It supports: - Shorthand DOM selectors (`$`, `$$`, `$id`) - Chainable DOM manipulation methods (`addClass`, `removeClass`, `toggleClass`, `show`, `hide`, `toggleVisibility`) - Flexible event handling (`on`, `off`) - Currency formatting (`formatCurrency`) Unlike jQuery, `macros.js` is more compact and leverages modern JavaScript APIs like `querySelector` and `classList`. ## Installation Include `macros.js` in your project by adding the script to your HTML file: ```html ``` Place the `