Return to Snippet

Revision: 21058
at December 2, 2009 12:34 by ozke


Updated Code
var url = window.location.href;
var hash = window.location.hash;
var index_of_hash = url.indexOf(hash) || url.length;
var hashless_url = url.substr(0, index_of_hash);

Revision: 21057
at December 2, 2009 12:34 by ozke


Updated Code
var url = window.location.href;
var hash = window.location.hash;
var index_of_hash = url.indexOf(hash) || url.length;
var hashless_url = url.substr(0, index_of_hash);
window.location = hashless_url+$(this).attr("href");

Revision: 21056
at December 2, 2009 11:44 by ozke


Initial Code
var url = window.location.href;
var hash = window.location.hash;
var hashless_url = url.substr(0, url.indexOf(hash));

Initial URL

                                

Initial Description

                                

Initial Title
Get URL without the hash

Initial Tags
url

Initial Language
JavaScript