Questions tagged [hashchange]

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 changes. Use this tag for questions related to this event and its related event handler onhashchange.

Resources

Related Tags

241 questions
4
votes
2 answers

When using Ajax History and Bookmark, is it always good to use "#!" instead of just "#"?

Facebook is doing Ajax History (Back and Forward button) and Bookmark using #! instead of just # in the URL. Is it always a good idea to do that, because I was thinking that a usual anchor could interfere with the Ajax History mechanism to trigger…
nonopolarity
  • 146,324
  • 131
  • 460
  • 740
4
votes
3 answers

How to fix window.location issue in iOS9 UIWebview

Since iOS9 release, my web app does not work anymore. The application uses a url hash based navigation and route changes trigger in a unpredictable way since iOS9. I made a lot of researches and find the issue in the managing of window.location in…
user1751482
  • 53
  • 1
  • 1
  • 6
4
votes
1 answer

Hashchange causing phonegap app to crash?

I'm using ajax within my phonegap app to load the content for different pages. I'm also using the onhashchange to enable back button functionality. All works fine initially but if I click 3 different links (and trigger 3 hash changes) then my app…
woolm110
  • 1,194
  • 17
  • 27
4
votes
3 answers

Capture only hashchange events not resulting from anchor clicks

I am trying to use Javascript to emulate the CSS :target pseudo-class so as to capture all events that result in an element on page being targeted. I've identified 3 trigger events: window.location.hash already targets an element of the same ID on…
Barney
  • 16,181
  • 5
  • 62
  • 76
4
votes
2 answers

jquery ajax history and bookmarking plugin

There are plugins for handling history and bookmarking like: http://plugins.jquery.com/project/history. Somehow it doesn't look as a complete solution. For example, on one page you might have a filter that consists of several checkboxes, text boxes…
Aleksandar Vucetic
  • 14,715
  • 9
  • 53
  • 56
4
votes
1 answer

jQuery address hash change trigger even if hash doesn't change

I am using this plugin http://www.asual.com/jquery/address/ for detecting hash changes and such for my website, it only uses this for its navigation so it's a vital part of the users experience. Now this works perfect for everything I am doing with…
Dylan Cross
  • 5,918
  • 22
  • 77
  • 118
4
votes
1 answer

why is hashchange firing twice in Jquery Mobile backwards transitions?

I'm lost.... I'm trying to redirect Jquery Mobile transitions on pagebeforechange - as per the JQM docs. This should work for both forward and backward transitions. While it technically does I'm running into problems on backwards transitions. First…
frequent
  • 27,643
  • 59
  • 181
  • 333
3
votes
3 answers

Can the PHP $_GET be used to get a variable in the URL using Hashchange?

Click Me When…
user1109244
  • 107
  • 1
  • 1
  • 6
3
votes
1 answer

Hashchange events with the Back Button in the Backbone Router/History

I'm using the following system configuration: Chromium 14.0.835.202 on Ubuntu 11.04 using Backbone 0.5.3 A Backbone Router with the following routes and callbacks defined: , routes: { '': 'handlerRoot' ,…
uyjco0
  • 41
  • 1
  • 4
3
votes
2 answers

Detect Vue SPA url changes (listen to route updates)

I have my JavaScript script injected to an existing website and running on top of it. The website is a SPA built with Vue.js. I would like to detect url changes (routes) in this SPA and call my own function, passing the new url as parameter. I tried…
amiregelz
  • 1,833
  • 7
  • 25
  • 46
3
votes
4 answers

Is there any way to make jQuery BBQ Google Indexable?

I'm working on a AJAX powered web site and I decided to use Ben Alman's BBQ plugin for hashchange event. But, with this plugin, I can't make Hashchanges for Google search (!#) Is there any other plugin for it? Thanks
Burak F. Kilicaslan
  • 535
  • 2
  • 8
  • 20
3
votes
3 answers

onhashchange with IE 9

I have the following code $(document).ready(function() { if ("onhashchange" in window) { alert("The browser supports the hashchange event!"); } function test(){ alert("hash has changed = " + window.location.hash) } …
Aly
  • 15,865
  • 47
  • 119
  • 191
3
votes
0 answers

hashchange event not being fired on mobile Chrome (Wordpress site)

In my Wordpress site, I've created a Modal shortcode, which opens a modal when the modal's "name" is in the hash part of the location. For instance /#contact-us will open my "contact us" modal. To do this I have a hashchange event listener on the…
jonny bordo
  • 549
  • 3
  • 7
  • 17
3
votes
1 answer

Page scrolls to top when closing modal using back button in mobile Safari

This is potentially a somewhat oddly specific question. The situation: I have a page with a position:fixed modal dialog (actually several, but that's irrelevant to the problem, as far as I've been able to determine). The modal opens when clicking a…
Masala
  • 86
  • 1
  • 8
3
votes
1 answer

jquery hashchange troubles in chrome 32.0.1700.76 m

I just updated to chrome version 32.0.1700.76 m and I am now noticing that hashchange seem to act weird. sometimes it work, sometimes it doesn't. I have the following code on my homepage and I haven't changed the code in a few months. worked fine a…
mhrvatin
  • 156
  • 2
  • 12