How do you prevent the default action of an event in jQuery?
Description : Use the .preventDefault() method within an event handler to prevent the default action.
Answer :
To prevent the default action of an event in jQuery, call the `.preventDefault()` method on the event object within the event handler. For example,`$('form').on('submit', function(event) { event.preventDefault(); alert('Form submission prevented!'); });` stops the form from submitting and triggering the default behavior. This method is useful when you want to handle events with custom logic while avoiding the default browser behavior, such as submitting a form or following a link.