How to open select programmatically

前端 未结 4 1480
醉梦人生
醉梦人生 2021-01-17 10:07

Does anyone know if it is possible to open a select programmatically in angularjs. Ive tried

angular.element(el).trigger(\'focus\');
angular.element(el).trig         


        
4条回答
  •  遥遥无期
    2021-01-17 10:31

    Try this for Hover:

    JS:

    $(document).ready(function(){
    $("#selectId").hover(function(){
       $(this)[0].size=$(this).find("option").length;
    });
    $("#selectId").click(function(){
       $(this)[0].size=0;
    });
    });
    

    HTML:

    
    

提交回复
热议问题