pass the number of link
<p>I have a html.twig file with this</p>

<pre><code>{% set num= 1%}
{% for idea in ideas %}

    &lt;div class="add"&gt;
        &lt;a href="#"&gt; Comentar &lt;/a&gt;|&lt;a href="#" rel="like{{num}}"&gt; Tomado &lt;/a&gt;|&lt;a href="#"&gt;Valorar&lt;/a&gt;
    &lt;/div&gt;
&lt;/div&gt;
{% set num= num +1 %}
{% endfor %}
</code></pre>

<p>so depend of the number of ideas I have more o less likes, like this</p>

<pre><code>&lt;a rel="like1" href="#"&gt; Tomado &lt;/a&gt;
&lt;a rel="like2" href="#"&gt; Tomado &lt;/a&gt;
&lt;a rel="like3" href="#"&gt; Tomado &lt;/a&gt;
</code></pre>

<p>If I want to do a click in jquery,but how I indicate the number of link, the value of num variable</p>

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

<p>any idea!</p>
