hashchange is a DOM window event that is fired when the URL's fragment identifier changes.
hashchange is a DOM window event that is fired when the URL's fragment-identifier changes. Use this tag for questions related to this event and its related event handler onhashchange.
I am using Ajax and hash for navigation.
Is there a way to check if the window.location.hash changed like this?
http://example.com/blah#123 to http://example.com/blah#456
It works if I check it when the document loads.
But if I have #hash based…
How would I have a JavaScript action that may have some effects on the current page but would also change the URL in the browser so if the user hits reload or bookmark, then the new URL is used?
It would also be nice if the back button would…
How can I write the Javascript callback code that will be executed on any changes in the URL fragment identifier (anchor)?
For example from http://example.com#a to http://example.com#b
I am using:
$(window).bind( 'hashchange', function(e) { });
to bind a function to the hash change event. This seems to work in IE8, Firefox and Chrome, but not in Safari and I assume not in earlier version of IE. For these browsers, I want to…
I just set up my new homepage at http://ritter.vg. I'm using jQuery, but very minimally.
It loads all the pages using AJAX - I have it set up to allow bookmarking by detecting the hash in the URL.
//general functions
function getUrl(u) {
…
What I want is to have links which change a part of the page , and a dynamic URL for it, where I can specify variables such like #calendar=10_2010tabview=tab2
Check this for an exact example: CLICK HERE FOR EXACT DEMO
So here is the link format what…
I've been looking around JQuery libraries for the URL hash, but found none that were good. There is the "history plugin", but we all know it's buggy and isn't flexible.
I am loading my pages inside a div. I'll need a way to do back/forward along…
I am working with a site where all content is rendered via ajax postbacks using jquery. I am using Ben Alman's hashchange (http://benalman.com/projects/jquery-hashchange-plugin/) to manage the hash history which allows me to bookmark pages, use the…
See http://balupton.github.io/jquery-history/demo/
I was attracted with jquery.history.js
mean while I found
http://benalman.com/code/projects/jquery-hashchange/examples/document_domain/
I think the second one is just based on JQuery. I mean it…
I have some code (written by another developer) that is doing AJAX page loading inside of WordPress (e.g. no page reloads) when you click a nav item, AJAX refreshes the primary content area. My problem is that it's broken in IE7 and I have no idea…
I'm trying to test my Backbone.js web application with Selenium IDE.
Selenium can open my test case's initial URL so long as it's in a fresh browser window -- e.g. open /#/login -- but it times out whenever it tries to open subsequent URLs.
It seems…
I'm writing a simple photo album app using ASP.NET Ajax.
The app uses async Ajax calls to pre-load the next photo in the album, without changing the URL in the browser.
The problem is that when the user clicks the back button in the browser, the app…
I'm using JQuery Mobile UI and the widgit kit is nice. However I'm also using backbone.js which comes with a really neat hashchange controller framework. Problem is that JQuery Mobile UI has an inbuilt crappy hash change controller which assumes you…
I'm seeking a javascript history framework to handle navigation inside a page when the user selects multiple options which change the page behaviour.
There are multiple artefacts on the page that change the data loading of the page and I'd like to…
I'm developping a web app with CodeIgniter on back-end and Backbone.js on front-end.
I'm also using HTML5 Boilerplate as my start template.
I'm using Backbone's Controller and History as main navigation through my application. I've done it one time…