$("#btnClients").click(function () {
var idx;
var stable = $('#Tbody1').DataTable({
"ajax": {
"url": '/home/selectCustomers',
"type": "get",
"datatype": "json",
"data": { "critere": txtcr, "ch": txtch },
},
"columns": [
{
"data": "code", "autoWidth": true, "render": function (data) {
idx = data;
return '<h6 id="' + data + '">' + data + '</h6>';
}
},
]
});
});
$(document).ready(function () {
$("h6").dblclick(function () {
alert("You have clicked this twice.");
});
});
I have some actions, which should occur on a double-click event on h6. However, I tried with this code but it doesnt work. Any other way than this is appreciated.