_trigger() is a method inherited by all jQuery UI widgets. It calls jQuery's own trigger () under the hood, but adds the following functions:
The event will always be fired in the element that adds the widget (the target property of the event object changes accordingly).
The event that fires has a widget prefix added to its name (for example, calling _trigger("stop") on the sortable widget actually triggers the sortstop event).
The function returns false if one of the registered handlers returns false or calls preventDefault () in the event.
You can find the full implementation of _trigger() from lines 476 to 503 in the source code here .
source share