Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added jquery ui tabs example, minor other tweaks

  • Loading branch information...
commit 96a3567dc876e18636067d19fd6ad517ae7c31e0 1 parent f02fa24
@cowboy cowboy authored
View
3  README.markdown
@@ -21,7 +21,8 @@ These working examples, complete with fully commented code, illustrate a few
ways in which this plugin can be used.
[http://benalman.com/code/projects/jquery-bbq/examples/fragment-basic/](http://benalman.com/code/projects/jquery-bbq/examples/fragment-basic/)
-[http://benalman.com/code/projects/jquery-bbq/examples/fragment-advanced/](http://benalman.com/code/projects/jquery-bbq/examples/fragment-advanced/)
+[http://benalman.com/code/projects/jquery-bbq/examples/fragment-advanced/](http://benalman.com/code/projects/jquery-bbq/examples/fragment-advanced/)
+[http://benalman.com/code/projects/jquery-bbq/examples/fragment-jquery-ui-tabs/](http://benalman.com/code/projects/jquery-bbq/examples/fragment-jquery-ui-tabs/)
## Support and Testing ##
View
4 docs/files/jquery-ba-bbq-js.html
@@ -11,11 +11,11 @@
-<div id=Content><div class="CFile"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="jQuery_BBQ:Back_ButtonQuery_Library"></a>jQuery BBQ: Back Button &amp; Query Library</h1><div class=CBody><p><b>Version: 0.1pre, Last updated: 9/30/2009</b></p><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>Home</td><td class=CDLDescription><a href="http://benalman.com/projects/jquery-bbq-plugin/" class=LURL target=_top>http://benalman.com/projects/jquery-bbq-plugin/</a></td></tr><tr><td class=CDLEntry>GitHub</td><td class=CDLDescription><a href="http://github.com/cowboy/jquery-bbq/" class=LURL target=_top>http://github.com/cowboy/jquery-bbq/</a></td></tr><tr><td class=CDLEntry>Source</td><td class=CDLDescription><a href="http://github.com/cowboy/jquery-bbq/raw/master/jquery.ba-bbq.js" class=LURL target=_top>http://github.com<wbr>/cowboy<wbr>/jquery-bbq<wbr>/raw<wbr>/master<wbr>/jquery.ba-bbq.js</a></td></tr><tr><td class=CDLEntry>(Minified)</td><td class=CDLDescription><a href="http://github.com/cowboy/jquery-bbq/raw/master/jquery.ba-bbq.min.js" class=LURL target=_top>http://github.com<wbr>/cowboy<wbr>/jquery-bbq<wbr>/raw<wbr>/master<wbr>/jquery.ba-bbq.min.js</a> (3.1kb)</td></tr></table><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SMain"><td class=SEntry><a href="#jQuery_BBQ:Back_ButtonQuery_Library" >jQuery BBQ: Back Button &amp; Query Library</a></td><td class=SDescription><b>Version: 0.1pre, Last updated: 9/30/2009</b></td></tr><tr class="SGeneric SMarked"><td class=SEntry><a href="#License" >License</a></td><td class=SDescription>Copyright &copy; 2009 &ldquo;Cowboy&rdquo; Ben Alman, Licensed under the MIT license. </td></tr><tr class="SGeneric"><td class=SEntry><a href="#Examples" >Examples</a></td><td class=SDescription>These working examples, complete with fully commented code, illustrate a few ways in which this plugin can be used.</td></tr><tr class="SGeneric SMarked"><td class=SEntry><a href="#Support_and_Testing" >Support and Testing</a></td><td class=SDescription>Information about what version or versions of jQuery this plugin has been tested with, what browsers it has been tested in, and where the unit tests reside (so you can test it yourself).</td></tr><tr class="SGeneric"><td class=SEntry><a href="#Release_History" >Release History</a></td><td class=SDescription></td></tr><tr class="SSection"><td class=SEntry><a href="#Param(to_string)" >Param (to string)</a></td><td class=SDescription></td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#jQuery.param.querystring" >jQuery.<wbr>param.<wbr>querystring</a></td><td class=SDescription>Retrieve the query string from a URL or if no arguments are passed, the current document.location.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#jQuery.param.querystring(build_url)" >jQuery.<wbr>param.<wbr>querystring (build url)</a></td><td class=SDescription>Merge a URL, with or without pre-existing query string params, plus any object, params string or URL containing query string params into a new URL.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#jQuery.param.fragment" >jQuery.<wbr>param.<wbr>fragment</a></td><td class=SDescription>Retrieve the fragment (hash) from a URL or if no arguments are passed, the current document.location.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#jQuery.param.fragment(build_url)" >jQuery.<wbr>param.<wbr>fragment (build url)</a></td><td class=SDescription>Merge a URL, with or without pre-existing fragment (hash) params, plus any object, params string or URL containing fragment (hash) params into a new URL.</td></tr><tr class="SSection"><td class=SEntry><a href="#Deparam(from_string)" >Deparam (from string)</a></td><td class=SDescription></td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#jQuery.deparam" >jQuery.<wbr>deparam</a></td><td class=SDescription>Deserialize a params string into an object, optionally coercing numbers, booleans, null and undefined values; this method is the counterpart to the internal jQuery.param method.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#jQuery.deparam.querystring" >jQuery.<wbr>deparam.<wbr>querystring</a></td><td class=SDescription>Parse the query string from a URL or the current document.location, deserializing it into an object, optionally coercing numbers, booleans, null and undefined values.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#jQuery.deparam.fragment" >jQuery.<wbr>deparam.<wbr>fragment</a></td><td class=SDescription>Parse the fragment (hash) from a URL or the current document.location, deserializing it into an object, optionally coercing numbers, booleans, null and undefined values.</td></tr><tr class="SSection"><td class=SEntry><a href="#Element_manipulation" >Element manipulation</a></td><td class=SDescription></td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#jQuery.elemUrlAttr" >jQuery.<wbr>elemUrlAttr</a></td><td class=SDescription>Get the internal &ldquo;Default URL attribute per tag&rdquo; list, or augment the list with additional tag-attribute pairs, in case the defaults are insufficient.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#jQuery.fn.querystring" >jQuery.<wbr>fn.<wbr>querystring</a></td><td class=SDescription>Update URL attribute in one or more elements, merging the current URL (with or without pre-existing query string params) plus any params object or string into a new URL, which is then set into that attribute. </td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#jQuery.fn.fragment" >jQuery.<wbr>fn.<wbr>fragment</a></td><td class=SDescription>Update URL attribute in one or more elements, merging the current URL (with or without pre-existing fragment/hash params) plus any params object or string into a new URL, which is then set into that attribute. </td></tr><tr class="SSection"><td class=SEntry><a href="#History,hashchange_event" >History, hashchange event</a></td><td class=SDescription></td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#jQuery.bbq.pushState" >jQuery.<wbr>bbq.<wbr>pushState</a></td><td class=SDescription>Adds a &lsquo;state&rsquo; into the browser history at the current position, setting location.hash and triggering any bound <a href="#window.onhashchange" class=LEvent id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">window.onhashchange</a> event callbacks (provided the new state is different than the previous state).</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#jQuery.bbq.getState" >jQuery.<wbr>bbq.<wbr>getState</a></td><td class=SDescription>Retrieves the current &lsquo;state&rsquo; from the browser history, parsing location.hash for a specific key or returning an object containing the entire state, optionally coercing numbers, booleans, null and undefined values.</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#Properties" >Properties</a></td><td class=SDescription></td></tr><tr class="SProperty SIndent2 SMarked"><td class=SEntry><a href="#jQuery.bbq.pollDelay" >jQuery.<wbr>bbq.<wbr>pollDelay</a></td><td class=SDescription>The numeric interval (in milliseconds) at which the <a href="#window.onhashchange" class=LEvent id=link2 onMouseOver="ShowTip(event, 'tt1', 'link2')" onMouseOut="HideTip('tt1')">window.onhashchange</a> polling loop executes. </td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#Events" >Events</a></td><td class=SDescription></td></tr><tr class="SEvent SIndent2 SMarked"><td class=SEntry><a href="#window.onhashchange" >window.<wbr>onhashchange</a></td><td class=SDescription>Fired when document.location.hash changes. </td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>
+<div id=Content><div class="CFile"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="jQuery_BBQ:Back_ButtonQuery_Library"></a>jQuery BBQ: Back Button &amp; Query Library</h1><div class=CBody><p><b>Version: 0.1pre, Last updated: 9/30/2009</b></p><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>Project Home</td><td class=CDLDescription><a href="http://benalman.com/projects/jquery-bbq-plugin/" class=LURL target=_top>http://benalman.com/projects/jquery-bbq-plugin/</a></td></tr><tr><td class=CDLEntry>GitHub</td><td class=CDLDescription><a href="http://github.com/cowboy/jquery-bbq/" class=LURL target=_top>http://github.com/cowboy/jquery-bbq/</a></td></tr><tr><td class=CDLEntry>Source</td><td class=CDLDescription><a href="http://github.com/cowboy/jquery-bbq/raw/master/jquery.ba-bbq.js" class=LURL target=_top>http://github.com<wbr>/cowboy<wbr>/jquery-bbq<wbr>/raw<wbr>/master<wbr>/jquery.ba-bbq.js</a></td></tr><tr><td class=CDLEntry>(Minified)</td><td class=CDLDescription><a href="http://github.com/cowboy/jquery-bbq/raw/master/jquery.ba-bbq.min.js" class=LURL target=_top>http://github.com<wbr>/cowboy<wbr>/jquery-bbq<wbr>/raw<wbr>/master<wbr>/jquery.ba-bbq.min.js</a> (3.1kb)</td></tr></table><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SMain"><td class=SEntry><a href="#jQuery_BBQ:Back_ButtonQuery_Library" >jQuery BBQ: Back Button &amp; Query Library</a></td><td class=SDescription><b>Version: 0.1pre, Last updated: 9/30/2009</b></td></tr><tr class="SGeneric SMarked"><td class=SEntry><a href="#License" >License</a></td><td class=SDescription>Copyright &copy; 2009 &ldquo;Cowboy&rdquo; Ben Alman, Licensed under the MIT license. </td></tr><tr class="SGeneric"><td class=SEntry><a href="#Examples" >Examples</a></td><td class=SDescription>These working examples, complete with fully commented code, illustrate a few ways in which this plugin can be used.</td></tr><tr class="SGeneric SMarked"><td class=SEntry><a href="#Support_and_Testing" >Support and Testing</a></td><td class=SDescription>Information about what version or versions of jQuery this plugin has been tested with, what browsers it has been tested in, and where the unit tests reside (so you can test it yourself).</td></tr><tr class="SGeneric"><td class=SEntry><a href="#Release_History" >Release History</a></td><td class=SDescription></td></tr><tr class="SSection"><td class=SEntry><a href="#Param(to_string)" >Param (to string)</a></td><td class=SDescription></td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#jQuery.param.querystring" >jQuery.<wbr>param.<wbr>querystring</a></td><td class=SDescription>Retrieve the query string from a URL or if no arguments are passed, the current document.location.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#jQuery.param.querystring(build_url)" >jQuery.<wbr>param.<wbr>querystring (build url)</a></td><td class=SDescription>Merge a URL, with or without pre-existing query string params, plus any object, params string or URL containing query string params into a new URL.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#jQuery.param.fragment" >jQuery.<wbr>param.<wbr>fragment</a></td><td class=SDescription>Retrieve the fragment (hash) from a URL or if no arguments are passed, the current document.location.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#jQuery.param.fragment(build_url)" >jQuery.<wbr>param.<wbr>fragment (build url)</a></td><td class=SDescription>Merge a URL, with or without pre-existing fragment (hash) params, plus any object, params string or URL containing fragment (hash) params into a new URL.</td></tr><tr class="SSection"><td class=SEntry><a href="#Deparam(from_string)" >Deparam (from string)</a></td><td class=SDescription></td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#jQuery.deparam" >jQuery.<wbr>deparam</a></td><td class=SDescription>Deserialize a params string into an object, optionally coercing numbers, booleans, null and undefined values; this method is the counterpart to the internal jQuery.param method.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#jQuery.deparam.querystring" >jQuery.<wbr>deparam.<wbr>querystring</a></td><td class=SDescription>Parse the query string from a URL or the current document.location, deserializing it into an object, optionally coercing numbers, booleans, null and undefined values.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#jQuery.deparam.fragment" >jQuery.<wbr>deparam.<wbr>fragment</a></td><td class=SDescription>Parse the fragment (hash) from a URL or the current document.location, deserializing it into an object, optionally coercing numbers, booleans, null and undefined values.</td></tr><tr class="SSection"><td class=SEntry><a href="#Element_manipulation" >Element manipulation</a></td><td class=SDescription></td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#jQuery.elemUrlAttr" >jQuery.<wbr>elemUrlAttr</a></td><td class=SDescription>Get the internal &ldquo;Default URL attribute per tag&rdquo; list, or augment the list with additional tag-attribute pairs, in case the defaults are insufficient.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#jQuery.fn.querystring" >jQuery.<wbr>fn.<wbr>querystring</a></td><td class=SDescription>Update URL attribute in one or more elements, merging the current URL (with or without pre-existing query string params) plus any params object or string into a new URL, which is then set into that attribute. </td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#jQuery.fn.fragment" >jQuery.<wbr>fn.<wbr>fragment</a></td><td class=SDescription>Update URL attribute in one or more elements, merging the current URL (with or without pre-existing fragment/hash params) plus any params object or string into a new URL, which is then set into that attribute. </td></tr><tr class="SSection"><td class=SEntry><a href="#History,hashchange_event" >History, hashchange event</a></td><td class=SDescription></td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#jQuery.bbq.pushState" >jQuery.<wbr>bbq.<wbr>pushState</a></td><td class=SDescription>Adds a &lsquo;state&rsquo; into the browser history at the current position, setting location.hash and triggering any bound <a href="#window.onhashchange" class=LEvent id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">window.onhashchange</a> event callbacks (provided the new state is different than the previous state).</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#jQuery.bbq.getState" >jQuery.<wbr>bbq.<wbr>getState</a></td><td class=SDescription>Retrieves the current &lsquo;state&rsquo; from the browser history, parsing location.hash for a specific key or returning an object containing the entire state, optionally coercing numbers, booleans, null and undefined values.</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#Properties" >Properties</a></td><td class=SDescription></td></tr><tr class="SProperty SIndent2 SMarked"><td class=SEntry><a href="#jQuery.bbq.pollDelay" >jQuery.<wbr>bbq.<wbr>pollDelay</a></td><td class=SDescription>The numeric interval (in milliseconds) at which the <a href="#window.onhashchange" class=LEvent id=link2 onMouseOver="ShowTip(event, 'tt1', 'link2')" onMouseOut="HideTip('tt1')">window.onhashchange</a> polling loop executes. </td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#Events" >Events</a></td><td class=SDescription></td></tr><tr class="SEvent SIndent2 SMarked"><td class=SEntry><a href="#window.onhashchange" >window.<wbr>onhashchange</a></td><td class=SDescription>Fired when document.location.hash changes. </td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>
<div class="CGeneric"><div class=CTopic><h3 class=CTitle><a name="License"></a>License</h3><div class=CBody><p>Copyright &copy; 2009 &ldquo;Cowboy&rdquo; Ben Alman, Licensed under the MIT license.&nbsp; <a href="http://benalman.com/about/license/" class=LURL target=_top>http://benalman.com/about/license/</a></p></div></div></div>
-<div class="CGeneric"><div class=CTopic><h3 class=CTitle><a name="Examples"></a>Examples</h3><div class=CBody><p>These working examples, complete with fully commented code, illustrate a few ways in which this plugin can be used.</p><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>Basic AJAX</td><td class=CDLDescription><a href="http://benalman.com/code/projects/jquery-bbq/examples/fragment-basic/" class=LURL target=_top>http://benalman.com<wbr>/code<wbr>/projects<wbr>/jquery-bbq<wbr>/examples<wbr>/fragment-basic<wbr>/</a></td></tr><tr><td class=CDLEntry>Advanced AJAX</td><td class=CDLDescription><a href="http://benalman.com/code/projects/jquery-bbq/examples/fragment-advanced/" class=LURL target=_top>http://benalman.com<wbr>/code<wbr>/projects<wbr>/jquery-bbq<wbr>/examples<wbr>/fragment-advanced<wbr>/</a></td></tr><tr><td class=CDLEntry>jQuery UI Tabs</td><td class=CDLDescription>COMING SOON</td></tr><tr><td class=CDLEntry>Deparam</td><td class=CDLDescription>COMING SOON</td></tr></table></div></div></div>
+<div class="CGeneric"><div class=CTopic><h3 class=CTitle><a name="Examples"></a>Examples</h3><div class=CBody><p>These working examples, complete with fully commented code, illustrate a few ways in which this plugin can be used.</p><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>Basic AJAX</td><td class=CDLDescription><a href="http://benalman.com/code/projects/jquery-bbq/examples/fragment-basic/" class=LURL target=_top>http://benalman.com<wbr>/code<wbr>/projects<wbr>/jquery-bbq<wbr>/examples<wbr>/fragment-basic<wbr>/</a></td></tr><tr><td class=CDLEntry>Advanced AJAX</td><td class=CDLDescription><a href="http://benalman.com/code/projects/jquery-bbq/examples/fragment-advanced/" class=LURL target=_top>http://benalman.com<wbr>/code<wbr>/projects<wbr>/jquery-bbq<wbr>/examples<wbr>/fragment-advanced<wbr>/</a></td></tr><tr><td class=CDLEntry>jQuery UI Tabs</td><td class=CDLDescription><a href="http://benalman.com/code/projects/jquery-bbq/examples/fragment-jquery-ui-tabs/" class=LURL target=_top>http://benalman.com<wbr>/code<wbr>/projects<wbr>/jquery-bbq<wbr>/examples<wbr>/fragment-jquery-ui-tabs<wbr>/</a></td></tr><tr><td class=CDLEntry>Deparam</td><td class=CDLDescription>COMING SOON</td></tr></table></div></div></div>
<div class="CGeneric"><div class=CTopic><h3 class=CTitle><a name="Support_and_Testing"></a>Support and Testing</h3><div class=CBody><p>Information about what version or versions of jQuery this plugin has been tested with, what browsers it has been tested in, and where the unit tests reside (so you can test it yourself).</p><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>jQuery Versions</td><td class=CDLDescription>1.3.2, 1.4pre</td></tr><tr><td class=CDLEntry>Browsers Tested</td><td class=CDLDescription>Internet Explorer 6-8, Firefox 2-3.6, Safari 3-4, Chrome, Opera 9.6-10.</td></tr><tr><td class=CDLEntry>Unit Tests</td><td class=CDLDescription><a href="http://benalman.com/code/projects/jquery-bbq/unit/" class=LURL target=_top>http://benalman.com<wbr>/code<wbr>/projects<wbr>/jquery-bbq<wbr>/unit<wbr>/</a></td></tr></table></div></div></div>
View
4 docs/nd/Data/FileInfo.nd
@@ -1,4 +1,4 @@
1.4
JavaScript
-/srv/projects/jquery-bbq/jquery.ba-bbq.min.js 1254316067 0 /srv/projects/jquery-bbq/jquery.ba-bbq.min.js
-/srv/projects/jquery-bbq/jquery.ba-bbq.js 1254316021 1 jQuery BBQ: Back Button & Query Library
+/srv/projects/jquery-bbq/jquery.ba-bbq.min.js 1254363283 0 /srv/projects/jquery-bbq/jquery.ba-bbq.min.js
+/srv/projects/jquery-bbq/jquery.ba-bbq.js 1254363227 1 jQuery BBQ: Back Button & Query Library
View
9 examples/config.php
@@ -3,6 +3,15 @@
$shell['title1'] = "jQuery BBQ";
$shell['link1'] = "http://benalman.com/projects/jquery-bbq-plugin/";
+ob_start();
+?>
+ <a href="http://benalman.com/projects/jquery-bbq-plugin/">Project Home</a>,
+ <a href="http://benalman.com/code/projects/jquery-bbq/docs/">Documentation</a>,
+ <a href="http://github.com/cowboy/jquery-bbq/">Source</a>
+<?
+$shell['h3'] = ob_get_contents();
+ob_end_clean();
+
$shell['jquery'] = 'jquery-1.3.2.js';
//$shell['jquery'] = 'jquery-1.4pre.js';
View
2  examples/fragment-advanced/burger.html
@@ -6,7 +6,7 @@
</head>
<body>
-<img src="burger.jpg" width="400" height="300">
+<img src="burger.jpg" width="200" height="150">
<h1>Delicious Burgers</h1>
<p>It might look like more food than you can eat, but trust me, you'll finish
this burger. What, you say you're a vegetarian? Ok then, try the
View
2  examples/fragment-advanced/chicken.html
@@ -6,7 +6,7 @@
</head>
<body>
-<img src="chicken.jpg" width="400" height="300">
+<img src="chicken.jpg" width="200" height="150">
<h1>Mesquite Rub Chicken</h1>
<p>This spicy meal might have you begging for "cerveza" but you'll be coming back for
seconds! Still hungry? Why not wash that chicken down with a heaping plate of
View
33 examples/fragment-advanced/index.php
@@ -7,17 +7,6 @@
$shell['h2'] = 'Cached AJAX + fragment + history + bookmarking = Tasty!';
// ========================================================================== //
-// SUBHEADER
-// ========================================================================== //
-
-ob_start();
-?>
- <a href="http://benalman.com/projects/jquery-bbq-plugin/">Home, Documentation, Source</a>
-<?
-$shell['h3'] = ob_get_contents();
-ob_end_clean();
-
-// ========================================================================== //
// SCRIPT
// ========================================================================== //
@@ -41,11 +30,11 @@
$('.bbq a[href^=#]').live( 'click', function(e){
var state = {},
+ // Get the id of this .bbq widget.
+ id = $(this).closest( '.bbq' ).attr( 'id' ),
+
// Get the url from the link's href attribute, stripping any leading #.
url = $(this).attr( 'href' ).replace( /^#/, '' );
-
- // Get the id of this .bbq widget.
- id = $(this).closest( '.bbq' ).attr( 'id' );
// Set the state!
state[ id ] = url;
@@ -59,7 +48,7 @@
// iterates over all .bbq widgets, getting their appropriate url from the
// current state. If that .bbq widget's url has changed, display either our
// cached content or fetch new content to be displayed.
- $(window).bind( 'hashchange', function (e) {
+ $(window).bind( 'hashchange', function(e) {
// Iterate over all .bbq widgets.
$('.bbq').each(function(){
@@ -187,8 +176,6 @@
border: 1px solid #913D00;
float: right;
margin-left: 10px;
- width: 200px;
- height: 150px;
}
a.bbq-current {
@@ -238,9 +225,7 @@
</p>
-<h3>Navigation</h3>
-
-<p>This div.bbq widget has id "bbq1"</p>
+<h3>This div.bbq widget has id "bbq1"</h3>
<div class="bbq" id="bbq1">
<div class="bbq-nav bbq-nav-top">
@@ -258,7 +243,7 @@
<!-- This content will be shown if no path is specified in the URL fragment. -->
<div class="bbq-default bbq-item">
- <img src="bbq.jpg" width="400" height="300">
+ <img src="bbq.jpg" width="200" height="150">
<h1>jQuery BBQ</h1>
<p>Click a nav item above to load some delicious AJAX content! Also, once
the content loads, feel free to further explore our savory delights by
@@ -270,7 +255,7 @@
<div style="clear:both;"></div>
</div>
-<p>This div.bbq widget has id "bbq2"</p>
+<h3>This div.bbq widget has id "bbq2"</h3>
<div class="bbq" id="bbq2">
<div class="bbq-nav bbq-nav-top">
@@ -288,7 +273,7 @@
<!-- This content will be shown if no path is specified in the URL fragment. -->
<div class="bbq-default bbq-item">
- <img src="bbq.jpg" width="400" height="300">
+ <img src="bbq.jpg" width="200" height="150">
<h1>jQuery BBQ</h1>
<p>And there's plenty more where that came from! Don't forget to click
here for some down-home AJAX content, cooked special, just for this
@@ -302,7 +287,7 @@
<h3>The code</h3>
-<p>Note that a lot of the following code is very similar to the <a href="../fragment-basic/">basic window.onhashchange</a> example. That's intentional! They're functionally very similar, but while this version is far more robust, it is somewhat more complex. Look at both to see which meets your needs, and don't be afraid to adapt.</p>
+<p>Note that a lot of the following code is very similar to the <a href="../fragment-basic/">basic window.onhashchange</a> example. That's intentional! They're functionally very similar, but while this version is far more robust, it is somewhat more complex. Look at both to see which meets your needs, and don't be afraid to adapt. Also, if you want to see a robust AND simple implementation, be sure to check out the <a href="../fragment-jquery-ui-tabs/">jQuery UI Tabs</a> example.</p>
<pre class="brush:js">
<?= htmlspecialchars( $shell['script'] ); ?>
View
2  examples/fragment-advanced/kebabs.html
@@ -6,7 +6,7 @@
</head>
<body>
-<img src="kebabs.jpg" width="400" height="300">
+<img src="kebabs.jpg" width="200" height="150">
<h1>Savory Shish-Kebabs</h1>
<p>Who doesn't like kebabs? Nobody! That's why this meat and veggie combo is sure
to blow your mind! Still, if you aren't in the mood for wooden sticks, why not let a
View
2  examples/fragment-advanced/kielbasa.html
@@ -6,7 +6,7 @@
</head>
<body>
-<img src="kielbasa.jpg" width="400" height="300">
+<img src="kielbasa.jpg" width="200" height="150">
<h1>Sweet Kielbasa</h1>
<p>One bite of this kielbasa will have you asking for the recipe, and that's a fact.
But save some room, because while you're here, you've got to check out our fantastic
View
2  examples/fragment-advanced/ribs.html
@@ -6,7 +6,7 @@
</head>
<body>
-<img src="ribs.jpg" width="400" height="300">
+<img src="ribs.jpg" width="200" height="150">
<h1>Baby-Back Ribs</h1>
<p>What's better than a half-rack of ribs? A full rack! And if you like ribs,
which you do, you're sure to love our perfectly seared flame-broiled
View
2  examples/fragment-advanced/steak.html
@@ -6,7 +6,7 @@
</head>
<body>
-<img src="steak.jpg" width="400" height="300">
+<img src="steak.jpg" width="200" height="150">
<h1>Flame-Broiled Steak</h1>
<p>Seasoned and cooked perfectly, this amazing steak aims to please! And if you
have room left over, don't forget to help yourself to a plate of our sweet
View
15 examples/fragment-basic/index.php
@@ -7,17 +7,6 @@
$shell['h2'] = 'Cached AJAX + fragment + history + bookmarking = Tasty!';
// ========================================================================== //
-// SUBHEADER
-// ========================================================================== //
-
-ob_start();
-?>
- <a href="http://benalman.com/projects/jquery-bbq-plugin/">Home, Documentation, Source</a>
-<?
-$shell['h3'] = ob_get_contents();
-ob_end_clean();
-
-// ========================================================================== //
// SCRIPT
// ========================================================================== //
@@ -34,7 +23,7 @@
// Bind an event to window.onhashchange that, when the history state changes,
// gets the url from the hash and displays either our cached content or fetches
// new content to be displayed.
- $(window).bind( 'hashchange', function (e) {
+ $(window).bind( 'hashchange', function(e) {
// Get the hash (fragment) as a string, with any leading # removed. Note that
// in jQuery 1.4, you should use e.fragment instead of $.param.fragment().
@@ -240,7 +229,7 @@
<h3>The code</h3>
-<p>Note that a lot of the following code is very similar to the <a href="../fragment-advanced/">advanced window.onhashchange</a> example. That's intentional! They're functionally very similar, but while this version is far less robust, it is much more simple. Look at both to see which meets your needs, and don't be afraid to adapt.</p>
+<p>Note that a lot of the following code is very similar to the <a href="../fragment-advanced/">advanced window.onhashchange</a> example. That's intentional! They're functionally very similar, but while this version is far less robust, it is much more simple. Look at both to see which meets your needs, and don't be afraid to adapt. Also, if you want to see a robust AND simple implementation, be sure to check out the <a href="../fragment-jquery-ui-tabs/">jQuery UI Tabs</a> example.</p>
<pre class="brush:js">
<?= htmlspecialchars( $shell['script'] ); ?>
View
BIN  examples/fragment-jquery-ui-tabs/bbq.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  examples/fragment-jquery-ui-tabs/burger.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  examples/fragment-jquery-ui-tabs/chicken.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
238 examples/fragment-jquery-ui-tabs/index.php
@@ -0,0 +1,238 @@
+<?PHP
+
+include "../index.php";
+
+$shell['title2'] = "window.onhashchange » jQuery UI Tabs";
+
+$shell['h2'] = 'Multiple jQuery UI Tabs + fragment + history + bookmarking = Tasty!';
+
+// ========================================================================== //
+// SCRIPT
+// ========================================================================== //
+
+ob_start();
+?>
+$(function(){
+
+ // Enable tabs on all tab widgets. If you define a callback for the 'select'
+ // event, it will be executed for the selected tab whenever the hash changes.
+ $('.tabs').tabs();
+
+ // Define our own click handler for the tabs, overriding the default.
+ $('.tabs ul.ui-tabs-nav a').click(function(){
+ var state = {},
+
+ // Get the id of this tab widget.
+ id = $(this).closest( '.tabs' ).attr( 'id' ),
+
+ // Get the index of this tab.
+ idx = $(this).parent().prevAll().length;
+
+ // Set the state!
+ state[ id ] = idx;
+ $.bbq.pushState( state );
+
+ // And finally, prevent the default link click behavior by returning false.
+ return false;
+ });
+
+ // Bind an event to window.onhashchange that, when the history state changes,
+ // iterates over all tab widgets, changing the current tab as necessary.
+ $(window).bind( 'hashchange', function(e) {
+
+ // Iterate over all tab widgets.
+ $('.tabs').each(function(){
+
+ // Get the index for this tab widget from the hash, based on the
+ // appropriate id property. In jQuery 1.4, you should use e.getState()
+ // instead of $.bbq.getState(). The second, 'true' argument coerces the
+ // string value to a number.
+ var idx = $.bbq.getState( this.id, true ) || 0;
+
+ // Select the appropriate tab for this tab widget (you could keep track of
+ // what tab each widget is on using .data, and only select a tab if it has
+ // changed).
+ $(this).tabs( 'select', idx );
+ });
+ })
+
+ // Since the event is only triggered when the hash changes, we need to trigger
+ // the event now, to handle the hash the page may have loaded with.
+ $(window).trigger( 'hashchange' );
+
+});
+<?
+$shell['script'] = ob_get_contents();
+ob_end_clean();
+
+// ========================================================================== //
+// HTML HEAD ADDITIONAL
+// ========================================================================== //
+
+ob_start();
+?>
+<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.js"></script>
+<link rel="stylesheet" href="http://jqueryui.com/themes/base/ui.all.css" type="text/css" media="all" />
+
+<script type="text/javascript" src="../../jquery.ba-bbq.js"></script>
+<script type="text/javascript" language="javascript">
+
+<?= $shell['script']; ?>
+
+$(function(){
+
+ // Syntax highlighter.
+ SyntaxHighlighter.highlight();
+
+});
+
+</script>
+<style type="text/css" title="text/css">
+
+/*
+bg: #FDEBDC
+bg1: #FFD6AF
+bg2: #FFAB59
+orange: #FF7F00
+brown: #913D00
+lt. brown: #C4884F
+*/
+
+ul li {
+ list-style: none !important;
+}
+
+.tabs h1 {
+ margin: 0;
+ font-size: 180%;
+}
+
+.tabs p {
+ font-size: 150%;
+ margin: 5px 0 0;
+}
+
+.tabs img {
+ border: 1px solid #913D00;
+ float: right;
+ margin-left: 10px;
+ width: 200px;
+ height: 150px;
+}
+
+.tabs .shim {
+ clear: both;
+ padding-bottom: 1em;
+}
+
+#page {
+ width: 700px;
+}
+
+</style>
+<?
+$shell['html_head'] = ob_get_contents();
+ob_end_clean();
+
+// ========================================================================== //
+// HTML BODY
+// ========================================================================== //
+
+ob_start();
+?>
+
+<p>
+ With <a href="http://benalman.com/projects/jquery-bbq-plugin/">jQuery BBQ</a> you can keep track of state, history and allow bookmarking multiple <a href="http://jqueryui.com/demos/tabs/">jQuery UI tab</a> widgets simultaneously.. just click some tabs, use your browser's back and next buttons, reload the page.. and when you're done playing, check out the code!
+</p>
+
+<p>
+ Like the <a href="../fragment-advanced/">advanced window.onhashchange</a> example, document.location.hash is used to store a serialized data object representing the state of multiple tab boxes. Due to the flexibility of $.bbq.pushState(), each tab box doesn't need to know the state of any other tab box to push a state change onto the history, only their state needs to be specifed and it will be merged in, creating a new history entry and a page state that is bookmarkable. Of course, if you only want to keep track of a single item on the page, you might want to check out the <a href="../fragment-basic/">basic window.onhashchange</a> example.
+</p>
+
+<h3>This jQuery UI Tabs widget has id "some_tabs"</h3>
+
+<div id="some_tabs" class="tabs">
+ <ul>
+ <li><a href="#some_tabs_0">jQuery BBQ</a></li>
+ <li><a href="#some_tabs_1">Burgers</a></li>
+ <li><a href="#some_tabs_2">Chicken</a></li>
+ <li><a href="#some_tabs_3">Kebabs</a></li>
+ </ul>
+ <div id="some_tabs_0">
+ <img src="bbq.jpg" width="200" height="150">
+ <h1>jQuery BBQ</h1>
+ <p>Click a tab above to display some delicious content!</p>
+ </div>
+ <div id="some_tabs_1">
+ <img src="burger.jpg" width="200" height="150">
+ <h1>Delicious Burgers</h1>
+ <p>It might look like more food than you can eat, but trust me, you'll finish
+ this burger.</p>
+ </div>
+ <div id="some_tabs_2">
+ <img src="chicken.jpg" width="200" height="150">
+ <h1>Mesquite Rub Chicken</h1>
+ <p>This spicy meal might have you begging for "cerveza" but you'll be coming back for
+ seconds!</p>
+ </div>
+ <div id="some_tabs_3">
+ <img src="kebabs.jpg" width="200" height="150">
+ <h1>Savory Shish-Kebabs</h1>
+ <p>Who doesn't like kebabs? Nobody! That's why this meat and veggie combo is sure
+ to blow your mind!</p>
+ </div>
+ <div class="shim"></div>
+</div>
+
+<h3>This jQuery UI Tabs widget has id "more_tabs"</h3>
+
+<div id="more_tabs" class="tabs">
+ <ul>
+ <li><a href="#more_tabs_0">jQuery BBQ</a></li>
+ <li><a href="#more_tabs_1">Kielbasa</a></li>
+ <li><a href="#more_tabs_2">Ribs</a></li>
+ <li><a href="#more_tabs_3">Steak</a></li>
+ </ul>
+ <div id="more_tabs_0">
+ <img src="bbq.jpg" width="200" height="150">
+ <h1>jQuery BBQ</h1>
+ <p>And there's plenty more where that came from! Don't forget to click
+ here for some more down-home content.</p>
+ </div>
+ <div id="more_tabs_1">
+ <img src="kielbasa.jpg" width="200" height="150">
+ <h1>Sweet Kielbasa</h1>
+ <p>One bite of this kielbasa will have you asking for the recipe, and that's a fact.</p>
+ </div>
+ <div id="more_tabs_2">
+ <img src="ribs.jpg" width="200" height="150">
+ <h1>Baby-Back Ribs</h1>
+ <p>What's better than a half-rack of ribs? A full rack!</p>
+ </div>
+ <div id="more_tabs_3">
+ <img src="steak.jpg" width="200" height="150">
+ <h1>Flame-Broiled Steak</h1>
+ <p>Seasoned and cooked perfectly, this amazing steak aims to please!</p>
+ </div>
+ <div class="shim"></div>
+</div>
+
+<h3>The code</h3>
+
+<p>Note that a lot of the following code is very similar to the <a href="../fragment-advanced/">advanced window.onhashchange</a> example. That's intentional! They're functionally very similar, but this example is much less complicated due to jQuery UI Tabs' built-in functionality.</p>
+
+<pre class="brush:js">
+<?= htmlspecialchars( $shell['script'] ); ?>
+</pre>
+
+<?
+$shell['html_body'] = ob_get_contents();
+ob_end_clean();
+
+// ========================================================================== //
+// DRAW SHELL
+// ========================================================================== //
+
+draw_shell();
+
+?>
View
BIN  examples/fragment-jquery-ui-tabs/kebabs.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  examples/fragment-jquery-ui-tabs/kielbasa.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  examples/fragment-jquery-ui-tabs/ribs.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  examples/fragment-jquery-ui-tabs/steak.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
3  examples/index.php
@@ -100,7 +100,8 @@ function draw_shell() {
if ( count( get_included_files() ) == 2 ) {
$shell['title2'] = "Examples";
- $shell['h2'] = 'Select an example from the list below:';
+ $shell['h2'] = 'Select an example:';
+ $shell['h3'] = '';
$shell['html_body'] = '';
View
10 jquery.ba-bbq.js
@@ -11,10 +11,10 @@
//
// *Version: 0.1pre, Last updated: 9/30/2009*
//
-// Home - http://benalman.com/projects/jquery-bbq-plugin/
-// GitHub - http://github.com/cowboy/jquery-bbq/
-// Source - http://github.com/cowboy/jquery-bbq/raw/master/jquery.ba-bbq.js
-// (Minified) - http://github.com/cowboy/jquery-bbq/raw/master/jquery.ba-bbq.min.js (3.1kb)
+// Project Home - http://benalman.com/projects/jquery-bbq-plugin/
+// GitHub - http://github.com/cowboy/jquery-bbq/
+// Source - http://github.com/cowboy/jquery-bbq/raw/master/jquery.ba-bbq.js
+// (Minified) - http://github.com/cowboy/jquery-bbq/raw/master/jquery.ba-bbq.min.js (3.1kb)
//
// About: License
//
@@ -29,7 +29,7 @@
//
// Basic AJAX - http://benalman.com/code/projects/jquery-bbq/examples/fragment-basic/
// Advanced AJAX - http://benalman.com/code/projects/jquery-bbq/examples/fragment-advanced/
-// jQuery UI Tabs - COMING SOON
+// jQuery UI Tabs - http://benalman.com/code/projects/jquery-bbq/examples/fragment-jquery-ui-tabs/
// Deparam - COMING SOON
//
// About: Support and Testing
View
3  unit/index.html
@@ -6,6 +6,7 @@
<title>jQuery BBQ: Back Button & Query Library - Unit Tests</title>
<script type="text/javascript" src="../shared/jquery-1.4pre.js"></script>
+<!--<script type="text/javascript" src="../shared/jquery-1.3.2.js"></script>-->
<script type="text/javascript" src="testrunner.js"></script>
<link rel="stylesheet" href="testsuite.css">
@@ -897,7 +898,7 @@
</head>
<body>
-<h1>jQuery BBQ: Back Button & Query Library - Unit Tests (<a href="http://benalman.com/projects/jquery-bbq-plugin/">documentation / source</a>)</h1>
+<h1>jQuery BBQ: Back Button & Query Library - Unit Tests (<a href="http://benalman.com/projects/jquery-bbq-plugin/">Project Home</a>)</h1>
<h2 id="banner"></h2>
<h2 id="userAgent"></h2>
View
3  unit/jquery-1.3.2.html
@@ -5,6 +5,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>jQuery BBQ: Back Button & Query Library - Unit Tests</title>
+<!--<script type="text/javascript" src="../shared/jquery-1.4pre.js"></script>-->
<script type="text/javascript" src="../shared/jquery-1.3.2.js"></script>
<script type="text/javascript" src="testrunner.js"></script>
<link rel="stylesheet" href="testsuite.css">
@@ -897,7 +898,7 @@
</head>
<body>
-<h1>jQuery BBQ: Back Button & Query Library - Unit Tests (<a href="http://benalman.com/projects/jquery-bbq-plugin/">documentation / source</a>)</h1>
+<h1>jQuery BBQ: Back Button & Query Library - Unit Tests (<a href="http://benalman.com/projects/jquery-bbq-plugin/">Project Home</a>)</h1>
<h2 id="banner"></h2>
<h2 id="userAgent"></h2>
Please sign in to comment.
Something went wrong with that request. Please try again.