Active Link and Ajax issue

How do you css style an active link if you are using ajax. My link is like this

<a href="Javascript:function()">Function</a>

when I click the link the active css appears however when the content is refresh the css for an active link disappears. Any reason why this is happening?.