How do I get the fragment identifier (value after hash #) from a URL?
No need for jQuery
var type = window.location.hash.substr(1);
You may do it by using following code:
var url = "www.site.com/index.php#hello";
var hash = url.substring(url.indexOf('#')+1);
alert(hash);
SEE DEMO