dynamicElement

The dynamicElement util allows elements to be dynamically added to a common container element, defined in themes\shaw-globalnews\footer.php as

. When a dynamic element is added or removed from the container, an "added" or "removed" event is fired respectively, allowing certain actions to be carried out to the dynaically element through delegation of the 'added' / 'removed' event.

Exapmle: In "SocialShare", there's a delegation of the 'added' event, which triggers the setup of the social share button click listeners for dynamically added social share markup.

Source: