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

See the project home page for basic usage.

API Reference

Core methods

$.iframe()

Returns an iframe element, wrapped inside a standard jQuery collection – i.e. $('<iframe></iframe>') – that has been extended with some additional methods (for details on these, see below). This extended collection object is referred to here as an “AppleOfMyIframe” or “Aomi” object.

$.iframe(headContents, bodyContents, options, callback)

All arguments are optional:

  • headContents (string):
    An HTML string to be appended to the iframe document’s <head> element, once the iframe loads.
  • bodyContents (string):
    An HTML string to be appended to the iframe document’s <body> element, once the iframe loads.
  • options (object):
    An object of different options to use when initialising the iframe. See Options.
  • callback (function):
    A function that will be called when the iframe is ready. This fires after the Aomi object’s ‘ready’ event and before its ‘load’ event. See Events.

$(elem).intoIframe()

Replace elements with an iframe, and inject those replaced elements into the iframe’s body.
E.g. $('div#something').intoIframe();

Basic methods

$()

doctype()

document()

window()

location()

contents()

head()

body()

title()

style()

State methods

isSameDomain()

hasExternalDocument()

hasBlankSrc()

Event methods

load()

ready()

Modified jQuery collection methods

bind()

unbind()

one()

trigger()

live()

die()

Advanced methods

resize()

restore()

iframeLoad()

init()

args()

options()

reload()

clone()

replace()

repaint()

Clone this wiki locally