For a dashboard where there is a list of links I want to perform some actions if someone clicks the delete button. But somehow it only responds on the first link with id=\"delet
In HTML Ids must be unique. If you have multiple elements, you should use classes.
echo "";
Script, Use class selector to bind event
$('.delete_link').click(function(){ //Your code will work fine });