jQuery-UI's autocomplete not display well, z-index issue

前端 未结 12 1110
情深已故
情深已故 2021-01-31 12:54

I\'m currently implementing jQuery UI\'s autocomplete in my clients webshop. The problem is: the element the autocomplete resides in, has a higher z-index then the z-index of th

12条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-31 13:35

    If you are able to enforce a higher z-index upon the autocomplete text input then this is the solution to your problem.

    jQuery UI Autocomplete options list calculates its z-index value by taking the z-index of the text input it's being attached to and adds 1 to that value.

    So you can give a z-index of 999 to the text input the autocomplete will have a z-index value of 1000

    Taken from http://bugs.jqueryui.com/ticket/5489

    
    

提交回复
热议问题