Skip to content

Instantly share code, notes, and snippets.

@fastcodecoq
Last active December 25, 2015 01:19
Show Gist options
  • Select an option

  • Save fastcodecoq/6893899 to your computer and use it in GitHub Desktop.

Select an option

Save fastcodecoq/6893899 to your computer and use it in GitHub Desktop.
var urlHash = function (){
var URL = document.URL;
if(URL.match("#"))
{
var query = window.location.hash;
query = query.replace(/\/!|#/g,"");
return query;
}else
return false;
}
window.onload = function(){
if( urlHash() )
//accion con Hash
else
// accion sin hash
}
@Oxicode
Copy link

Oxicode commented Oct 18, 2013

Checa window.location.search

@fastcodecoq
Copy link
Author

pero eso es para los parametros GET ?var=... acá es para el hash, la función la mejoré.. de todas fromas gracias

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment