Detect if an HTML select element is expanded (without manually tracking state)

前端 未结 3 1608
花落未央
花落未央 2021-01-18 01:07

I\'d like to detect if a drop down is expanded or not. I don\'t want to use extra event handlers for click/mouseover etc because the drop-downs are dynamic and for other rea

3条回答
  •  死守一世寂寞
    2021-01-18 01:47

    Maybe you could do something like this:

    $('#dropdown').live('click', function(){
        //bind mousewheel here
    });
    
    $('#dropdown').live('change', function(){
        //unbind mousewheel here
    })

提交回复
热议问题