diff --git a/dist/example/example.js b/dist/example/example.js index 1879943..b444d74 100644 --- a/dist/example/example.js +++ b/dist/example/example.js @@ -9,7 +9,6 @@ $(function () { _pageStack: [], _configs: [], _defaultPage: null, - _isGo: false, default: function (defaultPage) { this._defaultPage = defaultPage; return this; @@ -19,12 +18,6 @@ $(function () { $(window).on('hashchange', function (e) { - var _isBack = !self._isGo; - self._isGo = false; - if (!_isBack) { - return; - } - var url = location.hash.indexOf('#') === 0 ? location.hash : '#'; var found = null; for(var i = 0, len = self._pageStack.length; i < len; i++){ @@ -70,7 +63,6 @@ $(function () { dom: $html }); - this._isGo = true; location.hash = config.url; if (!config.isBind) { @@ -122,7 +114,7 @@ $(function () { '.js_grid': { click: function (e) { var id = $(this).data('id'); - pageManager.go(id); + location.hash = id; } } } diff --git a/src/example/example.js b/src/example/example.js index 1879943..b444d74 100644 --- a/src/example/example.js +++ b/src/example/example.js @@ -9,7 +9,6 @@ $(function () { _pageStack: [], _configs: [], _defaultPage: null, - _isGo: false, default: function (defaultPage) { this._defaultPage = defaultPage; return this; @@ -19,12 +18,6 @@ $(function () { $(window).on('hashchange', function (e) { - var _isBack = !self._isGo; - self._isGo = false; - if (!_isBack) { - return; - } - var url = location.hash.indexOf('#') === 0 ? location.hash : '#'; var found = null; for(var i = 0, len = self._pageStack.length; i < len; i++){ @@ -70,7 +63,6 @@ $(function () { dom: $html }); - this._isGo = true; location.hash = config.url; if (!config.isBind) { @@ -122,7 +114,7 @@ $(function () { '.js_grid': { click: function (e) { var id = $(this).data('id'); - pageManager.go(id); + location.hash = id; } } }