lib-jquery-plugin-charts-include-js-lib-ycodaslider-2.0.rc2-lib-jquery.history-remote.js / js
History/Remote - jQuery plugin for enabling history support and bookmarking @requires jQuery v1.0.3 http://stilbuero.de/jquery/history/ Copyright (c) 2006 Klaus Hartl (stilbuero.de) Dual licensed under the MIT and GPL licenses: http://www.opensource.org/licenses/mit-license.php http://www.gnu.org/licenses/gpl.html Version: 0.2.3
Initialize the history manager. Subsequent calls will not result in additional history state change listeners. Should be called soonest when the DOM is ready, because in IE an iframe needs to be added to the body to enable history support. @example .ajaxHistory.initialize();
parameter: Function callback A single function that will be executed in case there is no fragment identifier in the URL, for example after navigating back to the initial state. Use to restore such an initial application state. Optional. If specified it will overwrite the default action of emptying all containers that are used to load content into. @type undefined @name
Implement Ajax driven links in a completely unobtrusive and accessible manner (also known as "Hijax") with support for the browser's back/forward navigation buttons and bookmarking. The link's href attribute gets altered to a fragment identifier, such as "#remote-1", so that the browser's URL gets updated on each click, whereas the former value of that attribute is used to load content via XmlHttpRequest from and update the specified element. If no target element is found, a new div element will be created and appended to the body to load the content into. The link informs the history manager of the state change on click and adds an entry to the browser's history. jQuery's Ajax implementation adds a custom request header of the form "X-Requested-With: XmlHttpRequest" to any Ajax request so that the called page can distinguish between a standard and an Ajax (XmlHttpRequest) request. @example $('a.remote').remote('#output'); @before <a class="remote" href="/path/to/content.html">Update</a> @result <a class="remote" href="#remote-1">Update</a> @desc Alter a link of the class "remote" to an Ajax-enhanced link and let it load content from "/path/to/content.html" via XmlHttpRequest into an element with the id "output". @example $('a.remote').remote('#output', {hashPrefix: 'chapter'}); @before <a class="remote" href="/path/to/content.html">Update</a> @result <a class="remote" href="#chapter-1">Update</a> @desc Alter a link of the class "remote" to an Ajax-enhanced link and let it load content from "/path/to/content.html" via XmlHttpRequest into an element with the id "output".
parameter: String expr A string containing a CSS selector or basic XPath specifying the element to load content into via XmlHttpRequest.
parameter: Object settings An object literal containing key/value pairs to provide optional settings. @option String hashPrefix A String that is used for constructing the hash the link's href attribute gets altered to, such as "#remote-1". Default value: "remote-".
parameter: Function callback A single function that will be executed when the request is complete. @type jQuery @name remote @cat Plugins/Remote
author: Klaus Hartl/klaus.hartl@stilbuero.de
Implement Ajax driven links in a completely unobtrusive and accessible manner (also known as "Hijax") with support for the browser's back/forward navigation buttons and bookmarking. The link's href attribute gets altered to a fragment identifier, such as "#remote-1", so that the browser's URL gets updated on each click, whereas the former value of that attribute is used to load content via XmlHttpRequest from and update the specified element. If no target element is found, a new div element will be created and appended to the body to load the content into. The link informs the history manager of the state change on click and adds an entry to the browser's history. jQuery's Ajax implementation adds a custom request header of the form "X-Requested-With: XmlHttpRequest" to any Ajax request so that the called page can distinguish between a standard and an Ajax (XmlHttpRequest) request. @example $('a.remote').remote( $('#output > div')[0] ); @before <a class="remote" href="/path/to/content.html">Update</a> @result <a class="remote" href="#remote-1">Update</a> @desc Alter a link of the class "remote" to an Ajax-enhanced link and let it load content from "/path/to/content.html" via XmlHttpRequest into an element with the id "output". @example $('a.remote').remote('#output', {hashPrefix: 'chapter'}); @before <a class="remote" href="/path/to/content.html">Update</a> @result <a class="remote" href="#chapter-1">Update</a> @desc Alter a link of the class "remote" to an Ajax-enhanced link and let it load content from "/path/to/content.html" via XmlHttpRequest into an element with the id "output".
parameter: Element elem A DOM element to load content into via XmlHttpRequest.
parameter: Object settings An object literal containing key/value pairs to provide optional settings. @option String hashPrefix A String that is used for constructing the hash the link's href attribute gets altered to, such as "#remote-1". Default value: "remote-".
parameter: Function callback A single function that will be executed when the request is complete. @type jQuery @name remote @cat Plugins/Remote
author: Klaus Hartl/klaus.hartl@stilbuero.de
Provides the ability to use the back/forward navigation buttons in a DHTML application. A change of the application state is reflected by a change of the URL fragment identifier. The link's href attribute needs to point to a fragment identifier within the same resource, although that fragment id does not need to exist. On click the link changes the URL fragment identifier, informs the history manager of the state change and adds an entry to the browser's history.
parameter: Function callback A single function that will be executed as the click handler of the matched element. It will be executed on click (adding an entry to the history) as well as in case the history manager needs to trigger it depending on the value of the URL fragment identifier, e.g. if its current value matches the href attribute of the matched element. @type jQuery @name history @cat Plugins/History
author: Klaus Hartl/klaus.hartl@stilbuero.de
(C) Æliens 20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.