<ul>
<a href="#Project">
<li onclick="project()">Projects</li>
</a>
</ul>
a tab appears and you can click on it, which runs a javascript function and also changes the url to www.demo.com#Project.
Is it possible when i give someone the link like www.demo.com#Project it loads the page and automatically runs function project()
EDIT SOLUTION
if(window.location.hash == "#Project") {
setTimeout('project();', 1);
}
else {
}
a timeout must be set so it loads the page first then execute function
<li>directly as a child of<a>and also you cannot put<li>or any other block elements inside<a>. It's like putting a bottle inside water, as a container.<li><a></a></li>but not<a><li></li></a>. Check this