Description : The .on() method is used to attach event handlers to elements.
Answer :
The `.on()` method in jQuery is used to attach event handlers to elements. It is more versatile than older methods like `.click()` or `.bind()`, allowing you to attach multiple event types and handle events for dynamically added elements. For example,`$('#elementId').on('click', function() { alert('Clicked!'); });` attaches a click event handler to the element withID`elementId`. You can also use `.on()`for event delegation, such as`$(document).on('click', '#elementId', function() { alert('Clicked!'); });`, which handles clicks on elements that may be added later.