How to pass parameter with a href and onclick function
<p>I want to pass parameter when I click in <code>&lt;a href&gt;</code>, first I have this and works fine:</p>

<pre><code>    &lt;a href="#" rel="like{{num}}"&gt; I like &lt;/a&gt;|

   $("a[rel^='like']").click(function(){
            $.ajax({
                ...
            });
</code></pre>

<p>but I don't know how to pass parameter to that function, so I do this:</p>

<pre><code>    &lt;a href="#" rel="like{{num}}"
          onclick="cap(para1, para2)"&gt; I like &lt;/a&gt;
</code></pre>

<p>Finally, in my Javascript I have this simple function:</p>

<pre><code>    function cap(para1, para2){
        alert('here');
    }
</code></pre>

<p>but I obtain this error:</p>

<pre><code>ReferenceError: cap is not defined
</code></pre>

<p>Any idea?</p>
