jQuery events on responsive datatables not working
I would suggest use .on
instead and attach your click
function and data
attribute to <a>
instead of <i>
as below:
DEMO HERE
Your last column of each row would change to
<td width="10%">
<a href="#" class="deleteMe" data="some text 1">
<i alt="Delete" class="fa fa-trash fa-lg" id="questionDelete" ></i>
</a>
</td>
Same for other columns which is there in demo
JS for delete would be:
$(".dataTable").on('click','.deleteMe', function () {
var dataString = $(this).attr('data');
alert(dataString);
});