Return to Snippet

Revision: 9234
at October 27, 2008 00:53 by sircambridge


Initial Code
	  var getHashFromURL = function() {
          var r = window.location.href;
          var i = r.indexOf("#");
          return (i >= 0 ? r.substr(i+1) : "");
      };
      var setURLHash = function(newhash) {
          var url = window.location.href;
          url = (!url.match('#'))?url+'#':url.substr(0,url.indexOf('#')+1);
          window.location.href = url+newhash;
      };

Initial URL


Initial Description


Initial Title
get/Set URL hash

Initial Tags


Initial Language
Other