In raw Javascript, how would one go about checking that a specific hash tag exists in a url, then grab the value?
Example: http://www.example.com/index.html#hashtag1
I use this, and it works just fine for me. It's a little adjusing to a line I picked up somewhere, I believe on SO.
getURLHashParameter : function(name) { return decodeURI( (RegExp('[#|&]' + name + '=' + '(.+?)(&|$)').exec(location.hash)||[,null])[1] ); },