I want to add the click event to all elements where the `id="violacao": $(document).ready(function () { jQuery('#violacao').click(function() { alert('teste'); }); }); But just the first link responds to the click. This is the HTML generated: 40954589 Perda de Comunicação 88692020503 Perda de Comunicação When I try this way: jQuery("a").click(function() { alert('teste'); }); It works fine, except that all links are affected. What is wrong?