If window location contains text/parameter

hi guys,

I’m working on a script where I need to get some information from the url…I’ve used ‘location.href’ etc…but i’m not getting anywhere at the moment (does it matter if the js file is external?).

But anyway, basically I need to extract the #info from my url i.e. www.example.com/#info. and if (location.href contains == #info) { function1(); } etc…

sorry I bet sounds really confusing…But if you can help in anyway that would be great.

cheers