knockout event, which is called when loading an element

3.8k views Asked by At

Prompt please knockout event, which is called when loading an element.

Example:

<div data-bind="<my_event>: onPopupShown ">  </div>
1

There are 1 answers

0
Captain John On

There is no onload event for divs. BTW It's not a knockout event per se, knockout is simply a convenient wrapper for DOM events.

Only elements which load external resources such as images and scripts have an onload event.

Using some ideas from this link: How to add onload event to a div element? Perhaps you could use the YUI on and a custom knockout binding?

http://developer.yahoo.com/yui/3/event/#onavailable