【发布时间】:2016-10-31 12:10:52
【问题描述】:
我有一个带有“table-responsive”类的 div,它的 overflow-x 设置为“auto”。
在这个 div 中,有一个带有预输入的输入文本。当我发现结果返回到 typeahead 时,是在 div 里面。如何退出?
这是我的代码:
<div class="table-responsive">
<fieldset>
<legend>Righe</legend>
<table id="dettaglioDocumento" class="table table-condensed table-fixed" cellspacing="0" width="100%">
<col width="50px">
<col width="350px">
<thead>
<tr>
<td></td>
<td><label class="align-table">Descrizione</label></td>
</tr>
</thead>
<tbody>
<tr>
<td><img src="<?= $root; ?>/assets/img/details_close.png" class="link removeRow"></td>
<td>
<input name="txtDescrizione[]" data-target=".container-fluid" class="form-control selectDescrizione" data-provide="typeahead" autocomplete="off" name="txtDescrizione_0" type="text" placeholder="" value="">
</td>
</tr>
</tbody>
</table>
</fieldset>
</div>
这里是JS代码:
$('.selectDescrizione').typeahead({
minLength: 3,
items: 5,
delay: 400,
source: function (query, response) {
$.ajax({
url: '<?= $root; ?>/get_listino',
dataType: "json",
type: 'POST',
data: {
query: query
},
success: function (data) {
return response(data.listino);
}
});
},
displayText: function (item) {
return item.testo;
}
});
【问题讨论】:
-
你试过
z-index吗? -
@abhishek-pandey 是的,我尝试将其设置为高值,但没有...
-
如果您可以提供代码的工作小提琴,那将更容易调试您的代码。
-
由于
overflow类的overflow属性而隐藏 -
我知道...你知道怎么解决吗?
标签: jquery html css typeahead bootstrap-typeahead