Hello World
In this page we show you a small example of the use of the library, so you can see how easy it is to use.
Example
In this example, we use the "$" function to select the button element and attach a click event listener to it. When the button is clicked, we toggle the "active" class on the button and update its text content to reflect its active/inactive state.
<!DOCTYPE html>
<html>
<head>
<title>Hello World</title>
</head>
<body>
<h1>Hello, World!</h1>
<button id="btn">Click me</button>
<script src="path/to/library.js"></script>
<script>
// Select the button element
var btn = $("#btn");
// Add a click event listener to the button
btn.on("click", function() {
// Toggle the "active" class on the button
btn.toggleClass("active");
// Set the text content of the button
btn.text(btn.hasClass("active") ? "Active" : "Inactive");
});
</script>
</body>
</html>