From ccdad8cec61bc35fa67da40317e42fc42a12c161 Mon Sep 17 00:00:00 2001 From: Robert Bosse Date: Mon, 15 Oct 2012 13:32:23 -0400 Subject: [PATCH] hashchange event documentation Early beta of hashchange event documentation --- entries/hashtag.xml | 78 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 entries/hashtag.xml diff --git a/entries/hashtag.xml b/entries/hashtag.xml new file mode 100644 index 00000000..f7db5358 --- /dev/null +++ b/entries/hashtag.xml @@ -0,0 +1,78 @@ + + + .hashchange() + Enables bookmarkable #hash history. + +

The jQuery Mobile .hashchange() event handler enables very basic bookmarkable #hash history by providing a callback function bound to the window.onhashchange event. The onhashchange event fires when a window's hash changes.

+

In browsers that support it, the native HTML5 window.onhashchange event is used. In IE6/7 (and IE8 operating in "IE7 compatibility" mode), a hidden Iframe is created to allow the back button and hash-based history to work.

+ +
+ 1.0 + + + A function to invoke after the onhashchange event is fired. + + + + Click, and watch as the magic happens! + + + #nav { + font-size: 200%; + } + + #nav a { + color: #777; + border: 2px solid #777; + background-color: #ccc; + padding: 0.2em 0.6em; + text-decoration: none; + float: left; + margin-right: 0.3em; + } + + #nav a:hover { + color: #999; + border-color: #999; + background: #eee; + } + + #nav a.selected, + #nav a.selected:hover { + color: #0a0; + border-color: #0a0; + background: #afa; + } + + + + ]]> + + +