In PHP, it's pretty simple, I would suggest array_shift($string)?
If not, I'm sure there is an equally simple solution :)
However, is there a way to achieve the same in JavaScript?
My specific example is extracting window.location.hashfrom the address bar to dynamically load a specific AJAX page. If the hash is 2, that is, http: //foo.bar.com#2 ...
var hash = window.location.hash; // hash would be "#2"
Ideally, I would like to remove #so that the function is simple 2.
Thank!
source
share