Using jQuery

jQuery is a fast, small, and feature-rich JavaScript library. It makes things like HTML document traversal and manipulation, event handling, and animation much simpler with an easy-to-use API. In this post, we’ll introduce you to jQuery and show you how to get started.

Why jQuery?

jQuery simplifies many common JavaScript tasks and provides cross-browser compatibility. It is widely used in web development for creating interactive and dynamic web pages.

Using jQuery

Here’s an example of using jQuery to hide a paragraph when a button is clicked:

<!DOCTYPE html>
<html>
<head>
    <title>jQuery Example</title>
    <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
    <script>
        $(document).ready(function(){
            $("#hideButton").click(function(){
                $("p").hide();
            });
        });
    </script>
</head>
<body>
    <button id="hideButton">Hide Paragraph</button>
    <p>This is a paragraph.</p>
</body>
</html>

Stay tuned for more detailed tutorials on jQuery!

John & Kevin
Cyber Craftsmen Team