I need to detect once by load if a hash with #comment or #map is in the url to open a spoiled div with the comments and map.
This is the JavaScript that I use to open and close a div:
<script type="text/javascript">
function spoilinout(idinout){
if (document.getElementById) {
var dividinout = document.getElementById(idinout);
dividinout.style.display = (dividinout.style.display=='block'?'none':'block');
} }
</script>
How can I detect it?
Thanks
Frank
The current URL is stored in
window.location.hrefso you can always test: