====== Event Handling ====== jQuery simplifies event handling for various user interactions. ==== Click Event ==== $("#btn").click(function() { alert("Button Clicked!"); }); ==== Mouse Events ==== $("#box").mouseenter(function() { $(this).css("background-color", "lightblue"); }); $("#box").mouseleave(function() { $(this).css("background-color", "white"); }); ==== Keyboard Events ==== $("#inputField").keypress(function(event) { console.log("Key pressed: " + event.key); }); ==== Event Delegation ==== $("#parent").on("click", "button", function() { alert("Dynamically added button clicked!"); });