我试图将tooltips
改成laravelcollective
<div class="form-group col-sm-4">
{!! Form::label('exchange_id', 'Exchanges:') !!}
{!! Form::select('exchange_id', [''=>'Choose Options'] + $exchanges , null, ['class'=>'form-control', 'id'=>'exchange', 'name'=>'exchange_id', 'onchange' => 'all_function()'])!!}
</div>
在上面的选择框中,{!! Form::label('exchange_id', 'Exchanges:') !!}
我想在Bootstrap工具提示中加上问号,例如 Exchanges?。
我该怎么办?
答案 0 :(得分:1)
您可以将属性添加到label
标签,data-toggle="tooltip"
和title="Exchanges ?"
<div class="form-group col-sm-4">
{!! Form::label('exchange_id', 'Exchanges:', ['data-toggle' => 'tooltip', 'title' => 'Exchanges ?']) !!}
{!! Form::select('exchange_id', ['' => 'Choose Options'] + $exchanges, null, ['class' => 'form-control', 'id' => 'exchange', 'name' => 'exchange_id', 'onchange' => 'all_function()'])!!}
</div>
需要引导插件并使用它
$(function () {
$('[data-toggle="tooltip"]').tooltip()
})