Course Content
AJAX and jQuery Plugins
Learn how to use AJAX and plugins with jQuery to create dynamic and interactive web applications.
0/3
JQuery
About Lesson

Hands-On Practice

JavaScript
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Event Handling</title>
  <style>
    #button {
      padding: 10px 20px;
      background-color: green;
      color: white;
      border: none;
      cursor: pointer;
    }
  </style>
</head>
<body>
  <button id="button">Click Me</button>
  <script src="https://code.jquery.com/jquery-3.6.4.min.js"></script>
  <script>
    $(document).ready(function () {
      $("#button").click(function () {
        $(this).text("Button Clicked!");
      });

      $("#button").hover(
        function () {
          $(this).css("background-color", "blue");
        },
        function () {
          $(this).css("background-color", "green");
        }
      );
    });
  </script>
</body>
</html>