For some reason this code below is not alerting me the correct data-id when I click on one of the links.

This is what I have:

HTML

```
<a class="margin-0 size-9 serve" data-toggle="modal" data-target="#myModal2" data-id="3">Hello</a></p>
<a class="margin-0 size-9 serve" data-toggle="modal" data-target="#myModal2" data-id="4">Test</a></p>

```

Jquery

```
$(".serve").click(function(){ // Click to only happen on serve links
   alert($(this).attr('data-id'));
});

```

Thanks in advance