So what I want to do is determine if the current link is \'active\', i.e. if this link was just clicked by the user.
If it is, then I want to apply the class=s
class=s
I believe you want the :focus pseudo-class.
:focus
a:focus { background-color : #000; color : #fff; }
Here's a jsfiddle: http://jsfiddle.net/jasper/xn7UW/