Quick Answer
jQuery event handling: $(".btn").on("click", handler) - attaches a handler for the click event. .on() replaces the old .bind(), .live(), .delegate(). .off() removes handlers. .trigger("click") programmatically fires an event. .one() attaches a handler that fires exactly once. For delegated events: $("ul").on("click", "li", handler) - handles clicks on dynamically added li elements.
Answer
Use .on() to bind events: click, keyup, hover. .off() removes handlers.
S
SugharaIQ Editorial Team
Verified Answer
This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.