I have a table. In a cell of the table there is a link like this:
Use the .relatedTarget property mentioned in the Modal Event docs:
$(document).ready(function () { $('#remoteModal').on('show.bs.modal', function (event) { console.log($(event.relatedTarget).attr('data-id')); }); });