We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

How to trigger this evernt? | Forum

Topic location: Forum home » Support » General Questions
Marcus
Marcus Aug 22 '17
Guys please tell me how can I trigger this event on page load: welcomeWinget_loadAvatarChangeCmp
Brand
Brand Oct 17 '17

The script tag is available in DOM. So your choice in the order of occurrence:

1.      Earliest: Function refers to or consider in script tag just before closing the body tag. The DOM is ready at this point ( As stated by to the Google Closure folks, and they should know; I've also tested it on a bunch of browsers).

2.      Earliest: the java script is jQuery.ready callback.

3.      Late, after all page materials adding images are completely loaded: window on load event.


 

JB TECH
JB TECH Oct 17 '17
OW_EventManager, bind a variable ($event) to it, and then apply the function to a data array or element. You can see examples of how to trigger events if you look in plugin codes such as messages under "classes" with an event_handler.php file.