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

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

    This is what I did to set the z-index for autocomplete:

    $("#myInputId").autocomplete({
        open: function () { $('.ui-autocomplete').css('z-index', 50); },
        source: function (request, response) {
            $.ajax({
                url: "some url",
                type: "POST",
                dataType: "json",
                data: { /* some code... */ },
                success: function (data) { /* some code... */ }
            })
        }
    });
    

提交回复
热议问题