I am adding dynamically hyperlink and want to execute click event as below when ever user clicked on it but it is not firing up.
<table id="assinged_areas" class="table table-bordered table-condensed table-condensed">
<tbody></tbody>
</table>
When user selected some option in DropDown then it goes and get areas from server then ajax get calls this function by passing data to this function
function updateAssignedAreas(data) {
debugger;
var areas = data.split(',');
$.each(areas, function (i, item) {
$('#assinged_areas > tbody:last').append('<tr><td>' + item + '</td><td>' + '<a class=\'btn btn-danger\'><i class=\'fa fa-minus-circle\'></i></a>'
+ '</td></tr>');
});
}
This is the function when user click on unassign must call but not firing at all
$('.btn-danger').click(function (parameters) {
debugger;
});