Trigger click on select box on hover

后端 未结 6 1385
孤独总比滥情好
孤独总比滥情好 2020-11-30 13:10

I\'m trying to have a select box automatically pop open when the use hovers over it, as if they had clicked it. Is this possible?

I would think I could

6条回答
  •  青春惊慌失措
    2020-11-30 13:23

    Working Example

        $(function(){
        $(".chosen-select").chosen();
            $(".chosen-container-single").hover(function(){
                $(this).addClass("chosen-with-drop");
                $(this).addClass("chosen-container-active");
                $('.chosen-select').trigger("chosen:open");
            },function(){
                $(this).removeClass("chosen-with-drop");
                $(this).removeClass("chosen-container-active");
            });
        });
    
          
    
    
    
        
    

提交回复
热议问题