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
0
votes
3 answers

Refresh browser page on browser back click when changing hash value in url

I have a website with filters. I have appended hash whenever any filter is applied. For example i have city, color filter. URL/#color=red&city=Delhi Now when someone clicks browser back on such url, it becomes URL/#color=red. The city query string…
Sahil Sharma
  • 3,847
  • 6
  • 48
  • 98
0
votes
0 answers

'onhashchange' not working in Chrome

I'm trying to detect hashchanged which works fine in every browser except chrome. For example, with this code: if ("onhashchange" in window) { alert("The browser supports the hashchange event!"); } The statement is never executed in Chrome but…
wish
  • 21
  • 3
0
votes
1 answer

app-router navigate not working

I have this simple setup: index: test-element:
Alejandro
  • 1,159
  • 3
  • 16
  • 30
0
votes
1 answer

Anybody know of this bug in jQuery Address plugin?

Using jQuery Address plugin, if i create 2 bookmarks on IE 7 or 8: http://www.asual.com/jquery/address/samples/api/#/section/?id=1&name=n1&name=n2 http://www.asual.com/jquery/address/samples/api/#/section/2 now i go to google.com (or any other…
nonopolarity
  • 146,324
  • 131
  • 460
  • 740
0
votes
1 answer

Toggling between 2 bookmarks (or see a page, and load another page from bookmark) won't work with jQuery History plugin

Anyone knows how to fix this jQuery History plugin? (for ajax history and bookmark) In http://github.com/tkyk/jquery-history-plugin/issues#issue/5 This is the details: My app using IE 8's IE 7 Compatibility Mode as well as…
nonopolarity
  • 146,324
  • 131
  • 460
  • 740
0
votes
1 answer

jQuery hashchange event instantly executes animation with no speed

I am having trouble with jQuery and wrapping my animation inside hashchange event. When event is triggered animation happens instantly. I need it to be smooth. jQuery( document ).ready(function() { jQuery(window).on('hashchange',…
0
votes
1 answer

Backbone.history.navigate with $(window).on("hashchange") strange behavior

I have a Rails app that I'm using with Backbone JS as a FE framework with Coffeescript syntax. Now to get to the point quickly I'm using a Backbone trick than replaces Rails's redirect_to method: redirectTo = (something) -> …
Vlatko Ristovski
  • 111
  • 1
  • 11
0
votes
1 answer

Ajaxify's History and Bookmarking not working on Chrome?

Ajaxify is quite a well known jQuery plugin. But I just used Chrome and try this page: http://max.jsrhost.com/ajaxify/demo.php for the New v2 features: History & Bookmarking. When I click on Link 1, 2, and 3, and click the back button on Chrome,…
nonopolarity
  • 146,324
  • 131
  • 460
  • 740
0
votes
1 answer

Trigger function once on either hashchange or popstate

I have this jquery code: $(window).on('hashchange popstate', function() { someFunction(); }); I want to run someFunction() if the hash changes and also if the hash is removed. It seems like 'hashchange' does not fire if the hash is simply removed…
rablentain
  • 6,641
  • 13
  • 50
  • 91
0
votes
1 answer

Fire HashChangeEvent in dart

I'm using straight dart:html and I'm looking for a way to fire a HashChangeEvent. I'm already handling the hash change event: window.onHashChange.listen((HashChangeEvent e) { hashChange(window.location.hash); }); Now I'm looking for a way…
Jan Vladimir Mostert
  • 12,380
  • 15
  • 80
  • 137
0
votes
1 answer

Backbone.JS or Marionette.JS Routing without hash change dependency

I want to start using JavaScript frameworks - and thought I would try Backbone or Marionette as it is very modular and flexible (from what I can tell). The only thing that is bothering me at the moment is that they both seem to depend on Routing…
JustSteveKing
  • 968
  • 1
  • 10
  • 29
0
votes
1 answer

slowness when using hashchange event

I have a website that uses ajax for paging, the page system works according to the hashchange event, whenever I want to move to another page, I call a function that change the hash to the page number, when the hash changed the hashchange event is…
Rawhi
  • 6,155
  • 8
  • 36
  • 57
0
votes
1 answer

nesting location.hash to create subviews / subcategories

i can't figure out how to use nested hashes with window.location to have some sort of sub-categories. www.website.com/#!A/#!A1 is there a way to store or add the "#!A" fragment with the path, so i can append A1 and/or A2 individually?
0
votes
0 answers

location.hash returns previous position

I have a panel with Id="panelbar" , and when I click on it, I have a function $('#panelbar').bind('click', func1); in func1(): I have this Code: location.hash; but , the code returns the previous hash, not new one. how can I get the new hash in…
Sara N
  • 1,079
  • 5
  • 17
  • 45
0
votes
1 answer

Getting a URL to decide value of a checkbox

I have looked around and not found anything too useful as to how I can do this, so sorry if it's a repeat question. I am trying to get it so if a user clicks a certain link, they will be sent to a page with a checkbox pre-checked. For example, I…
Harry Francis
  • 133
  • 1
  • 10