hashchange

jquery history plugin

北城以北 提交于 2019-11-29 20:49:19
问题 I am using this plugin: http://plugins.jquery.com/project/history on this page: http://www.crtaci.info/index.php?autocom=majice I dont know why but it seems i cant figure out what to do to get this to work... Guess i need more sleep... :) 回答1: railscasts has an episode regarding this topic: http://railscasts.com/episodes/175-ajax-history-and-bookmarks 回答2: I use the jQuery BBQ: Back Button & Query Library. It's simple, robust, and has a http://benalman.com/projects/jquery-bbq-plugin/ 回答3: An

Cross-domain hash change communication

时光怂恿深爱的人放手 提交于 2019-11-29 04:59:33
Please consider the following two domains: domain1.com and domain2. From domain1 I open an iframe that points to domain2. Now, I want these guys to communicate with each other, which I've successfully accomplished by applying hash change event listeners on both domains. That way, the hash in the parent window (domain1) will trigger if domain2 calls parent.location with a new hash. Also, the hash change event triggers in the iframe if I from the parent changes its src attribute to a new hash. This works great! Here comes the trouble: The back and forward functionality in the browser gets messed

Cross-domain hash change communication

℡╲_俬逩灬. 提交于 2019-11-27 18:48:33
问题 Please consider the following two domains: domain1.com and domain2. From domain1 I open an iframe that points to domain2. Now, I want these guys to communicate with each other, which I've successfully accomplished by applying hash change event listeners on both domains. That way, the hash in the parent window (domain1) will trigger if domain2 calls parent.location with a new hash. Also, the hash change event triggers in the iframe if I from the parent changes its src attribute to a new hash.

What's the best library to do a URL hash/history in JQuery? [closed]

Deadly 提交于 2019-11-27 12:06:44
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 with the url hashing. mydomain.com/#home mydomain.com/#aboutus mydomain.com/#register What's the best library that can handle all of this? I recently looked at 3 different plugins - jquery history plugin , history , and jQuery BBQ . They were all quite hard to setup, I did get jQuery.history working but it still had problems with IE7. So I changed to

How to keep the browser history in sync when using Ajax?

别说谁变了你拦得住时间么 提交于 2019-11-27 01:46:38
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 doesn't go back to the previous photo, instead, it navigates to the home page of the application. Is there a way to trick the browser into adding each Ajax call to the browsing history? balupton Update: There is now the HTML5 History API (pushState, popState) which deprecates the HTML4 hashchange functionality. History.js provides cross-browser

Enabling back/fwd key events for an Ajax Application

本小妞迷上赌 提交于 2019-11-26 20:46:56
问题 I have an application which works heavily on AJAX. However I want to have navigation functionalities in it. To spoof the url, I am changing the location.hash, to generate URL. But if i use back/fwd, only the url changes, but page wont reload. How can I override the hstory.back to reload the page. 回答1: I don't know of any other way than continuous polling to implement this behaviour. An implementation might look like this: var lastHash = ''; function pollHash() { if(lastHash !== location.hash)

jQuery - hashchange event

风流意气都作罢 提交于 2019-11-26 12:58:38
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 disable my JavaScript code that uses the hash and hashchange event. Is there a way with jQuery that i can detect if the browser supports the hashchange event? Maybe something with jQuery.support ... You can detect if the browser supports the event by: if ("onhashchange" in window) { //... } See also: Detecting event support without browser sniffing

Handle URL anchor change event in js

↘锁芯ラ 提交于 2019-11-26 12:04:57
How can I write the JavaScript callback code that will be executed on any changes in the URL anchor? For example from http://example.com#a to http://example.com#b Google Custom Search Engines use a timer to check the hash against a previous value, whilst the child iframe on a seperate domain updates the parent's location hash to contain the size of the iframe document's body. When the timer catches the change, the parent can resize the iframe to match that of the body so that scrollbars aren't displayed. Something like the following achieves the same: var storedHash = window.location.hash;

jQuery - hashchange event

你。 提交于 2019-11-26 05:54:23
问题 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 disable my JavaScript code that uses the hash and hashchange event. Is there a way with jQuery that i can detect if the browser supports the hashchange event? Maybe something with jQuery.support ... 回答1: You can detect if the browser supports the event

How to show Ajax requests in URL?

你说的曾经没有我的故事 提交于 2019-11-26 02:07:33
问题 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 need: #calendar=10_2010&tabview=tab2 I need to have variables in the links like calendar and tabview so I can change multiple things on a single page without realoading. Or another format such like on http://www.wbhomes.com.au , this is exactly