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

How to display this next and prev title in url with bbq and jquery

any one can help me i have gallery and every li has data-title, i want to add that value to url, im trying with no luck its always saying undefined, but i have post id and i easily added that to url. any one knows how to pass that data-title…
Digital Legend
  • 149
  • 1
  • 13
0
votes
2 answers

how to keep the Bootstrap accordion keep one open , with hashchange event , click event?

I am trying to Twitter bootstrap using the accordion and plugin with jQuery plug-in hash change , if use location.hash open page and click other item more times , Before item can't toggle close and keep one open. have good solution, please help…
komodo
  • 37
  • 2
  • 6
0
votes
1 answer

Tracking onhashchange events

Looking for a best practice for the following scenario: In a traditional webapp, we perform analytics on logs based on http GETs. The project in question leverages HTML5, jQuery and Mustache.js to dynamically render templates from JSONP calls. The…
lars
  • 99
  • 1
  • 14
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
  • 679
  • 7
  • 21
  • 36
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
  • 13,724
  • 28
  • 88
  • 129
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,889
  • 18
  • 64
  • 95
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,281
  • 1
  • 20
  • 36
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
  • 33,686
  • 9
  • 90
  • 92
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,544
  • 13
  • 46
  • 76
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
  • 10,117
  • 28
  • 91
  • 139
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,852
  • 8
  • 41
  • 78