diff --git a/core/deck.core.js b/core/deck.core.js index a8adefe7..d499d3fc 100644 --- a/core/deck.core.js +++ b/core/deck.core.js @@ -596,6 +596,16 @@ that use the API provided by core. /* jQuery extension */ $.deck = function(method, arg) { + + $window.bind('hashchange.deck', function(event) { + if (event.originalEvent && event.originalEvent.newURL) { + goByHash(event.originalEvent.newURL); + } + else { + goByHash(window.location.hash); + } + }); + var args = Array.prototype.slice.call(arguments, 1); if (methods[method]) { return methods[method].apply(this, args); @@ -731,15 +741,6 @@ that use the API provided by core. $('html').addClass('ready'); }); - $window.bind('hashchange.deck', function(event) { - if (event.originalEvent && event.originalEvent.newURL) { - goByHash(event.originalEvent.newURL); - } - else { - goByHash(window.location.hash); - } - }); - $window.bind('load.deck', function() { if (options.preventFragmentScroll) { $container.scrollLeft(0).scrollTop(0);