Can I open a dropdownlist using jQuery

后端 未结 14 1606
终归单人心
终归单人心 2020-11-22 09:49

For this dropdownlist in HTML:


I would lik

14条回答
  •  遥遥无期
    2020-11-22 10:13

    One thing that this doesn't answer is what happens when you click on one of the options in the select list after you have done your size = n and made it absolute positioning.

    Because the blur event makes it size = 1 and changes it back to how it looks, you should have something like this as well

    $("option").click(function(){
        $(this).parent().blur();
    });
    

    Also, if you're having issues with the absolute positioned select list showing behind other elements, just put a

    z-index: 100;
    

    or something like that in the style of the select.

提交回复
热议问题