Hello, one more request from me:
I would like to have Bootstrap Tooltips on Buttons in an -> addColumn (who explain the icons).
Same Code then last time :-)
`
return Datatables::of($listquery)
->addColumn('action', 'teams.action')
->make(true);
i load here a extra page with the condition, and the buttons
`
@can('team.admin')
<a href="/myteams/teammemberlist/{!! $teamid !!}" class="btn btn-xs btn-primary">
<i class="fa fa-pencil-square"></i>
</a>
@endcan
The Bootstrap Code looks like this:
<a href="/myteams/teammemberlist/{!! $teamid !!}" class="btn btn-xs btn-primary" data-toggle="tooltip" title="edit the row!">
<i class="fa fa-pencil-square"></i>
</a>
Normalous i do the javascript code at the bottom of the template
<script>
$(document).ready(function(){
$('[data-toggle="tooltip"]').tooltip();
});
</script>
How can i get this working in datatables?
System details
i use homestead on windows for development
OS: Windows 10
PHP: 7.0
Laravel Version: 5.2
DB: mysql on (actual) homestad machine
@jgatringer you need to add the tooltip js on drawCallback
or draw.dt
event of DataTables.
$('table').on('draw.dt', function() {
$('[data-toggle="tooltip"]').tooltip();
})
Yes. Thanks a lot! Looks great now.
How to escape row title attribute for tooltip ? Or How to add tooltip to row ? or make our own using div ?
Most helpful comment
@jgatringer you need to add the tooltip js on
drawCallback
ordraw.dt
event of DataTables.