While all browsers do not support the onhashchange event, what is best suited for this?
Is there anything for this in jQuery? or as a plugin?
Not sure if this is what you are looking for or not, but worth a try:
http://plugins.jquery.com/project/ba-jquery-hashchange-plugin
Yes there is.
Check out this jQuery plugin: http://benalman.com/projects/jquery-hashchange-plugin/
var lastHash = ""; window.onload=function() { hashChangeEventListener = setInterval("hashChangeEventHandler()", 50); } function hashChangeEventHandler() { var newHash = location.hash.split('#')[1]; if(newHash != lastHash) { lastHash = newHash; //Do stuff! } }
Works great for me on all tested (damn almost all) platforms.
http://benalman.com/projects/jquery-bbq-plugin/
Another library that abstracts URL management, History.js
If you are looking for a cross-domain iframe solution, this is apparently the most reliable:http://easyxdm.net/wp/http://www.cakemail.com/the-iframe-cross-domain-policy-problem/
I have not tried this, although it seems that it can be a little difficult to implement and may not work in all situations.