jquery - jQueryUI autocomplete in Bootstrap modal displaying underneath modal -


i have jqueryui autocomplete in bootstrap modal window. when run in page works fine, when try add modal list appears behind modal, not in front.

i've tried variations of following no luck:

$("#mymodal").css("z-index", "1500");  $("tags'.$fieldname.'").css("z-index", "5000"); 

in modal:

data-backdrop="false" 

here source:

<!-- rfq modal --> <div class="modal" id="mymodal" tabindex="-1" role="dialog" aria-labelledby="mymodallabel" aria-hidden="true">   <div class="modal-dialog" style="z-index:2000;">     <div class="modal-content">       <div class="modal-header">         <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>         <h4 class="modal-title" id="mymodallabel">modal title</h4>       </div>        <div class="modal-body" data-backdrop="false"  >        <script>       $(function ps2() {                var availabletagsps2 = [       {label:"3rd tech (is# 20)", value:20},{label:"seabreeze computers (is# 14)", value:14},{label:"seabreeze computers (is# 14)", value:14},{label:"seabreeze computers (is# 14)", value:14},{label:"seabreeze computers (is# 14)", value:14},{label:"seabreeze computers (is# 14)", value:14},{label:"seabreeze computers (is# 14)", value:14}         ];        $("#tagsps2").autocomplete({            source: availabletagsps2        });    $( "#tagsps2" ).autocomplete({             source: availabletagsps2,             select: function ps2(event, ui) {             var selectedobj = ui.item;             $(this).val(selectedobj.label);             $('input[name="ps2"]').val(selectedobj.value);              return false;         }      }); /* $("#mymodal").css("z-index","6000");  $("#tagsps2").css("z-index","20000");*/   });    </script>    <input type="text" id="tagsps2"  required  autocomplete="off" placeholder="search..."    class="inputmed inline form-control input-med"  />   <input type="hidden" name="ps2" value=""  />          <div class="row" >               <div class="col-md-6">               <form role="form">                   <div class="form-group" >                      <!-- <input type="text" class="form-control" placeholder="select client" required> -->                   </div>                    <button type="submit" class="btn btn-primary btn-lg">submit</button>                 </form>               </div>                <div class="col-md-6">                      <button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#mymodal">                     <a href="dashboard.php?vrfq" class="light">view sent rfq's</a>                     </button>                 </div>          </div>       </div>       <div class="modal-footer">         <button type="button" class="btn btn-default" data-dismiss="modal">cancel</button>            </div>         </div>       </div>     </div> <!-- end modal -->      <a href="#" data-toggle="modal" data-target="#mymodal"><div class="rightcounter">&    nbsp;</div><h2>rfq</h2></a> 

using bootstrap 3.1.1 found sufficient add following css autocomplete work.

.ui-autocomplete {     z-index: 5000; } 

the ui-autocomplete class attached ul used internally construct autocomplete. giving crazy high z-index ensure laid out above else in page including modal dialog.


Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -