I want to use bootstrap modal in yejra datatable. when i click on open modal its pop up. Here modal works fine if I not call it from datatable. Here is my code. I am using laravel 5.6
return DataTables::of($users_data)
->addColumn('action', function ($users_data) use ($condition) {
return '<button type="button" class="myBtn btn btn-info btn-lg" id="">Open Modal</button>'
modal// here I just keep first line of modal code
<div class="modal fade" id="myModal" role="dialog">
</div>
js
$(document).ready(function(){
$(".myBtn").click(function(){
$("#myModal").modal();
});
});
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire