Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Commit 1e7ed8c

Browse files
author
scottjehl
committed
removed dependency on jQuery bbq in this file.
Now we only really need the hashchange plugin, unless plugins like tabs and tree end up needing to track their state via hash params. (Currently, jQuery.tabs.js uses bbq for tracking state under the "tab" parameter.) For now, this fixes #6
1 parent 04af588 commit 1e7ed8c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

js/jQuery.mobile.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@
202202
else{
203203
transitionSpecified = false;
204204
}
205-
prevUrl = $.bbq.getState('url');
206-
$.bbq.pushState({ url: href });
205+
prevUrl = location.hash.replace(/^#/,'');
206+
location.hash = href;
207207
//note: if it's a non-local-anchor and Ajax is not supported, go to page
208208
if(href.match(/^[^#]/) && !$.support.ajax){
209209
window.location = href;
@@ -323,10 +323,10 @@
323323
//define body
324324
$body = $('body');
325325

326-
//hashchange for page state tracking - uses bbq. - needs to be bound at domready (for IE6 Ben?)
326+
//hashchange for page state tracking - needs to be bound at domready (for IE6)
327327
//When document.location.hash changes, find or load content, make it active
328328
$window.bind( "hashchange", function(e){
329-
var url = e.getState('url'),
329+
var url = location.hash.replace(/^#/,''),
330330
back = (url === prevUrl);
331331

332332
if(url){

0 commit comments

Comments
 (0)