Skip to main content

events

The events object provides functions for binding callbacks to specific forum events. Bound callback functions can be run either every time the event is triggered or just the first time following the function being bound.

Methods

on

pb.events.on(event, callback)

Creates a bind for the specified event.

ParamTypeDescription
eventEventNameThe name of the event on which to bind.
callbackfunctionThe function to run when the specified event occurs.

one

pb.events.one(event, callback)

Creates a bind for the specified event that will only be triggered once.

ParamTypeDescription
eventEventNameThe name of the event on which to bind.
callbackfunctionThe function to run when the specified event occurs.

eventList

pb.events.eventList()

Lists all available event types.

Returns: Array.<EventName> - Returns an array of event type names.

EventName

An event name can be one of the following:

  • afterSearch
  • columnSort
  • moreActivity
  • moreNotification
  • pageChange
  • onPopMenuOpen
  • onPopMenuClose
  • onPopMenuItemClick