I have a click event with jQuery like that :
$(document).ready(function() {
$("#id_secteur_activite").click(function () {
console.log('ok');
});
});
On firefox and ie9, when i click on my element #id_secteur_activite
, i have the message "ok" in my console.
But when i test on ie 8 and ie7, i have nothing. .click doesn't work on ie<9.
Do you have any ideas ? thanks !
Edit :
<SELECT id=id_secteur_activite name=secteur_activite>
<OPTION selected value="">choisissez d'abord un secteur d'activité</OPTION>
</SELECT>
[DEMO(http://jsfiddle.net/mplungjan/8t8Jh/show/)
All works using a high enough version of jQuery (here edge which is currently v1.9.2pre)
use
.on()
and also use
alert
instead ofconsole
.you can use both
click
event andchange
event.