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

238 questions
0
votes
0 answers

Changing hash change to use slash instead

I am currently using hashchange along with some jquery code to switch between links on my page : bradleyhobbs.com/bodyevolution However, Instead of the webpage showing as localhost/#home or localhost/#membership, I want the url to show…
TheNameHobbs
  • 589
  • 6
  • 16
  • 34
0
votes
3 answers

Anchored AJAX and SEO workaround?

You all know how to build AJAX sites with those 300ms trigger for checking anchors (hash links) in URL and then loading proper page with AJAX. But, these anchor links are nothing to search engines =( I've thought of making some kind of workaround.…
Supercharged
  • 251
  • 4
  • 5
0
votes
2 answers

Open ColorBox with link generated by hashchange event

Our company wants to include a LinkedIn Share Button in the news section of our website. It is relatively simple and consists of a carousel that open up the news items individually in Colorbox windows. We want the LinkedIn button to be within the…
stegern
  • 1
  • 4
0
votes
1 answer

Using Dojo's onHashChange without topic?

Dojo's tutorial calls for using topic.subscribe to catch the onHashChange event - use of topic is heavy and is frowned upon within the organization, is there any way I can use dojo/on to catch and handle onHashChange?
antonpug
  • 11,964
  • 27
  • 76
  • 120
0
votes
1 answer

Persisting states amoung web pages

I have 2 web pages(2 different pages on same domain saywww.mysite.a.html and www.mysite.b.html ) In first page I have some check boxes; in second page I have some in input boxes. In the first page I have a link that takes me to the second…
Kuttan Sujith
  • 7,661
  • 18
  • 60
  • 89
0
votes
2 answers

Hash change cancel double trigger("click")

I've got some kind of loop here, explanation under code. $(document).ready(function(){ var newHash = ""; $('a').click(function(event) { var id = $(this).attr('href'); alert(id); …
Szymon
  • 1,254
  • 19
  • 34
0
votes
1 answer

Scrolling the window with jquery fails to animate when triggered by a hashchange in Backbone

I have a function which essentially looks like this: function scroll(scrollTop) { $("body,html").animate({scrollTop: scrollTop}); } And in Backbone routes, I'm trying to use this function to scroll to a position on a page, again, simplified: var…
numbers1311407
  • 31,870
  • 8
  • 84
  • 88
0
votes
1 answer

Hashchange event

So, there is something wrong with my hashchange... It wont trigger $('form').submit(function() { var form_data = ($(this).serialize()); window.location.hash = form_data.replace('=','/'); return false; }); $(window).on('hashchange',…
user2128056
  • 111
  • 1
  • 6
0
votes
1 answer

jQuery: hashchange function problems

I've set up a hashchange function on my site, which allows me to switch between 6 different sections on an 'about' page, this works great, it attached the hashes to each section no problem. The problem I'm having though is when you link to these…
user1374796
  • 1,446
  • 13
  • 43
  • 73
0
votes
1 answer

JavaScript function doesn't execute in IE (called onhashchange), works in Chrome, Firefox

This site: http://jcorps.org/jsuite WORKS in Chrome, changing the content based on a HASH CHANGE, and IE9 seems to be handling the onHashChange, but... IE9 doesn't execute the "UpdatePage()" function at all or produce an error message of any kind in…
0
votes
1 answer

JavaScript: calling a function by name on hashchange

I'm trying to call a function given the function name in the hash string. I have the following code: $(window).on('hashchange', function() { //alert(location.hash.substring(1, location.hash.length)); window[location.hash.substring(1,…
David Jones
  • 8,703
  • 22
  • 79
  • 132
0
votes
2 answers

global variables doesn't change value in Javascript

My project is composed by 2 html pages: index.html, which contains the login and the registration form. user_logged.html, which contains all the features of a logged-in user. Now, what I want to do is a control if the user is really logged in, to…
Martina
  • 1,954
  • 7
  • 33
  • 68
0
votes
1 answer

change the look of the hash in the hashchange plugin

I'm currently using http://benalman.com/projects/jquery-hashchange-plugin/ and I noticed that my hashes show up as "/#page" rather than "/#/page" Im trying to copy the look from jQuery Address. But the reason I can not use Asual is because it…
Robert
  • 784
  • 11
  • 28
0
votes
1 answer

Click Event to fire when using back and forward browser buttons

I'm using a click event to show a hidden inline div. I'm currently using Ben Alman's Jquery hashchange event http://benalman.com/projects/jquery-hashchange-plugin/ so that the forward and backward browser buttons will show the hashtag links in the…
0
votes
0 answers

Hashchange on click, trigger click when coming from another site

I have implemented this to my wordpress theme, and I'm trying to figure out, how to implement the hashchange, when I click a link inside a folder. I've tried to use this tutorial to trigger the hashchange. The hashchange works, when i comment out…
r1987
  • 537
  • 1
  • 7
  • 19
1 2 3
15
16