Represents the Ample SDK document created out of all Ample SDK fragments found on the page. In addition to the members listed in the table below it also has all members of Document object.
If you are coming from the jQuery universe, you will most likely enjoy using ample.query function, which is the jQuery-like API to Ample SDK. The function is overloaded and it can be called in any of the following flavours:
Queryample.query(String selector[, Nodecontext[, Function resolver]])
Retrieves a reference to a hash object of namespace prefixes collected from the root element of the hosting HTML page.
Retrieves a value that indicates the current state of the object. Possible values: "uninitialized" - Object is not initialized with data, "loading" - Object is loading its data, "loaded" - Object has finished loading its data, "interactive" - User can interact with the object even though it is not fully loaded, "complete" - Object is completely initialized.
type - The type of request to make ("POST" or "GET"), default is "GET".
url - A string containing the URL to which the request is sent.
async - By default, all requests are sent asynchronous.
data - Data to be sent to the server.
dataType - The type of data that you're expecting back from the server ("xml", "html", "script", "json" or "text").
timeout - A timeout (in milliseconds) for the request.
success(data, status, xhr) - A function to be called if the request succeeds. Parameter status can have of the following values: "success", "notmodified", "error", "timeout", "abort", or "parsererror".
error(xhr, status) - A function to be called if the request fails.
complete(xhr, status) - A function to be called when the request finishes
username - A username to be used in response to an HTTP access authentication request.
password - A password to be used in response to an HTTP access authentication request.
Manages browser history entries. When no arguments passed it returns the current hash value, otherwise adds a page with specifyed hash into the browser history. The hashchange event is not fired at this point.
Sets element in a modal state when element reference provided, Unsets modal state from the modal element if null passed. UI Events originated outside this element get supressed, except for one modal that is fired upon a click outside modal area.