How can I detect with javascript if an attribute "#" is appended to an url ?
I need a cross-browser solution. I'm currently using the following code, but it works only in Firefox:
if ((window.location.hash) || (window.location.hash != "#"))
window.scrollBy(0,-60);
thanks
location.hashshould work in all major browsers.if(!!window.location.hash)