-
Notifications
You must be signed in to change notification settings - Fork 4
API: Events
The following events are triggered on the AOMI object (and not on the actual iframe element). Use the event methods to bind handler functions to the events. E.g.
aomi.bind('resize', function(dimensions){
alert('iframe was resized');
});
Occurs after the iframe element has been fully prepared, and before the first ‘load’ event. In most cases, this will only ever fire once, but if the AOMI is reloaded, then the document will be re-created and the ‘ready’ event will fire again. (See API: Advanced methods).
The callback function that can be passed to the $.iframe()
constructor function is bound to the ‘ready’ event. (See API: Core methods).
Occurs after the ‘ready’ event, and every time that the iframe loads – e.g. if it is removed from and re-appended to the DOM, in browsers other than IE.
Occurs when jQuery methods are used to manipulate the iframe element, e.g. aomi.appendTo('#mySidebar');
.
The following methods will trigger this event:
- appendTo
- prependTo
- insertBefore
- insertAfter
- replaceAll
Occurs when jQuery methods are used to manipulate the iframe document’s body element, e.g. aomi.append('<p>hello</p>');
.
The following methods will trigger this event:
- append
- prepend
- html
- text
- wrapInner
- empty
Occurs when the aomi.head()
method is used to append contents to the iframe document’s head element. See the head()
method in API: Basic methods.