Last updated: 2020-11-16

Source: https://support.freshservice.com/support/solutions/articles/50000003069-custom-events

Self Service portal emits a number of events to help you do advanced customisations. You can listen to events at a document or container level.

Document Events

Events which can listened at a document level.

Example:

$(document).on('PageChange', function(e) {<br>new FSToastr({<br>    message: 'New Page Alert',<br>    type: 'success'<br>}, true, true);<br>console.log(e.detail);<br>});
PageUpdateFires when the page is updated
PageChangeFires when the page is changed
SearchOpenFires when the search overlay is opened
SearchCloseFires when the search overlay is closed
SideModalOpenFires when the side modal window is opened
SideModalRenderedFires when the side modal window is rendered
SideModalClosedFires when the side modal window is closed
ModalOpenFires when the modal opens (used in Add People / Delegate Approvals / Change password)
ModalCloseFires when the modal closes (used in Add People / Delegate Approvals / Change password)

Container Events

Events which can be listened at a container level

Example:

$('#search-results').on('SearchResult', function(e) {<br>new FSToastr({<br>    message: 'Search Results updated',<br>    type: 'success'<br>}, true, true);<br>console.log(e.detail);<br>});
DOM ContainerEventDescription
#search-resultsSearchResultFires when the search result is rendered
#menu-icon, .menu-triggerMenuOpenFires when the menu opens
MenuCloseFires when the menu closes
#ticket-attachmentsAttachmentLoadFires when the user attaches a file
AttachmentDoneFires when the attachment is uploaded
selectSelectOpenFires when the user opens a dropdown
SelectCloseFires when the user closes a dropdown