Jquery: help to get values from data attributes
<p>I have the following markup</p>

<pre><code>&lt;a href='#' id="remove_user_from_group" data-user-id="a9a4ae36-c6cd-11e1-9565-910084adb773" data-group-id="e4d66f80-d046-11e1-89b6-16f96811a1bd"&gt;x&lt;/a&gt;
</code></pre>

<p>And I want to get the data from <code>user-id</code> and <code>group-id</code>.</p>

<p>For now, I have tried:</p>

<pre><code>$this = $(this);
$("#remove_user_from_group").live('click', function() {
    var userid = $this.data('user-id');
    var groupid = $this.data('group-id');
    alert(userid);
    alert(groupid);
});
</code></pre>

<p>which pops me 2 alerts with <code>undefined</code> values.</p>

<p>What am I missing here?</p>
