I'm having trouble with jquery-ui autocomplete and slider on the same form (z-index) related

后端 未结 3 640
温柔的废话
温柔的废话 2021-01-20 02:34

I\'m attempting to create a web page using the jQuery ui lib. My design uses a jQuery ui autocomplete on an input field at the top of a form. Immediately below this autocomp

3条回答
  •  天命终不由人
    2021-01-20 03:37

    According to http://bugs.jqueryui.com/ticket/5238, there seem to be 2 solutions for this.

    "Changing the z-index to 3 seems to fix this completely."

    You can do this on your css, you just need to add "!important" to override the value the library sets:

    ul.ui-autocomplete {
        z-index: 3 !important;
    }
    

    Or, "set position:relative on autocomplete input, so that .zIndex() can actually compute the z-index."

提交回复
热议问题