Use :
var hash = window.location.hash;
var hash = hash.replace('#', '');
then the variable "hash" has the hash without "#"