Calling a javascript function from a link
<p>I have the following:</p>

<pre><code>    &lt;li&gt;&lt;a id="register" 
        class="access button red"
        data-action="Register" 
        title="Login"&gt;&lt;span class="smaller"&gt;REGISTER&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a id="login" 
        class="access button red"
        data-action="Login" 
        title="Login"&gt;&lt;span class="smaller"&gt;LOGIN&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
</code></pre>

<p>Is there an easy way in jQuery that I could make the clicking of one of these links call a 
javascript function and pass in the data-action as an argument. I put in the class called
"access" as I think I could use this to pick out these two links but then I am not sure 
what to do next.</p>
