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

后端 未结 3 657
温柔的废话
温柔的废话 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:24

    Using the open and close events to modify the z-index worked for me:

    $( "#tags" ).autocomplete({
      source: availableTags,      
      open: function(event, ui) { $(".ui-slider-handle").css("z-index", -1); },
      close: function(event, ui) { $(".ui-slider-handle").css("z-index", 2); }
    });
    

    See a demo here.

提交回复
热议问题