DataTables Unable to use Jquery dblclick()
DataTables Unable to use Jquery dblclick()
hi, here is the test page.
http://lasvegasfurniturefactoryoutlet.com/uspride/mapping.php
My intention is double clicking the last column and you will able to edit the field.
The problem is: my code only works on the first page of the table(as you may try). it doesn't work on any rows after the fist page (if you go to the second page and try to double click on the last column).
I don't have any clue of solving this problem. (dblclick is disabled? or jquery cannot find the <td>?)PLEASE take a look at it.
Thanks a lot.
Here is the Javascript I use.
$(document).ready(function(){ $("tbody>tr>td").dblclick(function(){ var inline = $(this).html(); var itemid = $(this).attr("id"); var indexval=inline.indexOf(""); } $("#edit"+itemid).focus().on("blur",function(){ var editval = $(this).val(); $(this).parents("td").html(editval); $("#process").load("edit.php",{id:itemid,update:editval}); }); }); });
Answers
problem solved.
Take off
$(document).ready(function(){
and it turns out to be working.