Skip to content
premasagar edited this page Sep 13, 2010 · 8 revisions

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');
});

ready

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).

load

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.

manipulateIframe

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

manipulateBody

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

manipulateHead

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.

init

reload

replace

repaint

resize

cache

restore

attachElement