0

I am using jquerys autocomplete plugin to search over a list. In the base of every page autocomplete floats over the page regular. But when i put searchbox in a bootstrap modal dialog box autocomplete dropdown stays at the back and couldn't be displayed. How can i stabilize it on the modal box.

/* the modal caller*/
$('#bizimMesajci').modal();

/* autocomplete plugin codes */
$('#' + nesneID).autocomplete({
    source: function (request, response) {
        response([{
            label: "Aranıyor...",
            loading: true
        }]);
        $.ajax({
            url: "evrak_action.php",
            data: {
                isTipi: 'kurumListesi',
                jsonMU: 'evet',
                arananKurum: $('#' + nesneID).val()
            },
            dataType: "json",
            type: "POST",
            success: function (data) {
                //=========================================================<
                response($.map(data, function (item) {

                    return {
                        label: item.label,
                        value: item.label,
                        kID: item.kID
                    }
                }));
                //=========================================================<

            },

        });
    },
    select: function (event, ui) {
        $('#' + nesneIDnum).val(ui.item.kID);
        $('#' + nesneID).val(ui.item.label);
        //console.log($("#evrakKurumID").val());
        return false;
    },
    focus: function (event, ui) {
        return false;
    },
    minLength: 3
});

http://jsfiddle.net/7zNBH

albertedevigo
  • 18,262
  • 6
  • 52
  • 58
caglaror
  • 459
  • 1
  • 13
  • 28

1 Answers1

0

Just add an optional parameters to autocomplete plugins caller function as described here: http://api.jqueryui.com/autocomplete/#option-appendTo solves my problem.

caglaror
  • 459
  • 1
  • 13
  • 28