Bind click event on select option

前端 未结 7 1268
长情又很酷
长情又很酷 2021-01-17 21:54

I\'ve got a problem making a click event on an HTML option element work.

Even a simple console.log(\'hello!\'); won\'t work.

相关标签:
7条回答
  • 2021-01-17 22:25

    This solve the case - for my needs (to catch the event when some of the select element on my page is clicked). Have not validated touch behavior though but Firefox, Chrome seems to be OK w/ this

    $('.class_for_select').focus(function() {
        // do something here
    });
    
    0 讨论(0)
提交回复
热议问题