gpt4 book ai didi

twitter-bootstrap - Bootstrap typeahead 在 Bootstrap 模式中不起作用

转载 作者:行者123 更新时间:2023-12-03 14:32:12 26 4
gpt4 key购买 nike

我正在使用 codeigniter 框架,我正在使用 bootstrap typeahead,一切都很好,但我的问题是当我将它放在 bootstrap 模式中时,bootstrap typeahead 将不起作用。有人能帮我吗?请。这是我的代码

<a data-target="ajaxify" data-toggle="modal" href="<?php echo base_url()?>task/add_task" class="no-u quick-task">
<h4>Task</h4>
<span>This is a simple description</span>
</a>

在我的 add_task Controller 中,我调用了 View task_view.php 和 task.js,但似乎预输入在 Bootstrap 模式中不起作用。

这是 task.js 的内容
$(document).ready(function(){
$("#assign_to").typeahead({
source: [{value: 'Charlie'}, {value: 'Gudbergur'}]
});
});

这是 task_view.php 的内容:只是一个示例。
<div id="ajaxx" class="modal hide fade">
<div class="modal-header">
<a class="close" data-dismiss="modal">&times;</a>
<!--Your title here -->
<h3>Modal Heading</h3>

</div>
<div class="modal-body">
<form><input type="text" name="assign_to" id="assign_to" /></form>
</div>
<div class="modal-footer">
<!--Your dont change the attributes only the value here -->
<a href="#" id="n0" class="btn n0" data-dismiss="modal">Close</a>
<a href="#" id="y1" class="btn btn-primary y1" data-submit="modal">Save</a>
</div>

最佳答案

您需要在 .typeahead 上放置一个 1051 的 z-index 以使其显示在模态 div 上方。

关于twitter-bootstrap - Bootstrap typeahead 在 Bootstrap 模式中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10220866/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com