I’m not quite sure about this, but I think it’s a kind of “personal event triggering”. I'll explain it better: you can define your own event listeners and fire them whenever you want. For example, you can define the myEvent event and fire it by simply executing .trigger('myEvent') . Here is a small snippet:
$(document).on('click.modal.data-api', '[data-toggle="modal"]', function (e) {
This is an event handler declaration that you can only call in this way:
$(document).trigger('click.modal.data-api');
Learn more about the .trigger() , .bind() and .on()
source share