You can call $.onmount() as much as you like. This will skip any behavior initialization for DOM nodes that have already been initialized. This is done to account for any new elements that may appear in your DOM.

// add more content


This allows you to set up polling checkpoints to trigger new behaviors on certain events. Great for events such as Bootstrap events or Turbolinks load.

Also, when used with jQuery, onmount can be passed as an event handler, eg, $(onmount).

  .on('ready load page:change', $.onmount)