lundi 13 juin 2016

jQuery: Firefox does not recognize dblclick()!


last few months I tried to develop some web application running JS, jQuery and PHP and most tricks I found here (thanks) and all scripts I tested by using Chrome. What to say, it worked until I decided to change testing browser. I decided FF v. 47 and expected it will works like fine as I saw in GC but not! Firefox simply 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" is this code:

$("#mytable").on("dblclick", "tr", function(e) {
  var idcel = $(event.target).attr('id'); 
  var idrow = $(e.currentTarget).attr('id'); 
  console.log('you clicked row with id= '+idrow); 
  console.log('id of clicked cell is: ' +idcel);
//...
  });
})

Is it up to me or FF has some dark secrets I don't know yet? Thank you.


Aucun commentaire:

Enregistrer un commentaire