jQuery: Firefox does not recognize dblclick()! -
last few months tried develop web application running js, jquery , php , tricks found here (thanks) , scripts tested using chrome. say, worked until decided change testing browser. decided ff v. 47 , expected works fine saw in gc not! firefox doesn't recognize dblclick() on cell of dynamically created table.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script> <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script> <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
"troublemaker" code:
$("#mytable").on("dblclick", "tr", function(e) { var idcel = $(event.target).attr('id'); var idrow = $(e.currenttarget).attr('id'); console.log('you clicked row id= '+idrow); console.log('id of clicked cell is: ' +idcel); //... }); })
is me or ff has dark secrets don't know yet? thank you.
according fast suggestion of a. wolff, above code shall follows:
$("#mytable").on("dblclick", "tr", function(e) { var idcel = e.target.id; var idrow=e.currenttarget.id; console.log('you clicked row id= '+idrow); console.log('id of clicked cell is: ' +idcel); //... }); })
all credits a. wolff. thank man.
Comments
Post a Comment