Quick Answer
Custom events in jQuery: trigger custom events with $(".el").trigger("myEvent", [data]) and listen with $(".el").on("myEvent", function(e, data) {}). Custom events bubble like native events. Use namespaced custom events ("myEvent.myPlugin") for clean removal. Great for decoupled communication between jQuery components without a global variable.
Answer
Trigger custom events using .trigger('customEvent'). Listen using .on('customEvent', handler). Enables decoupled communication across components.
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.