I am confused with how to show my table row to bootstrap modal, can anyone help me?
here is my modal:
<div id="edit_category_modal" class="modal fade" tabindex="-1" data-backdrop="static" data-keyboard="false">
<form id="form_edit_category">
<input type="hidden" name="_token" value="{{csrf_token()}}"/>
<div class="modal-header">
<h4 class="modal-title">Edit job category</h4>
</div>
<div class="modal-body">
<input id="name" type="text" class="form-control" name="name" placeholder="Category name"/>
</div>
<div class="modal-footer">
<button type="button" data-dismiss="modal" class="btn btn-default">Cancel</button>
<button type="submit" id="form_edit_category_submit" class="btn blue">Update</button>
</div>
</form>
</div>
and here is my table:
<table class="table table-striped table-bordered table-hover" id="categories_table">
<thead>
<tr role="row" class="heading">
<th width="1%"># ID</th>
<th>Name</th>
<th width="20%">Action</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>Category 1</td>
<td><button id="edit_category">Edit</button></td>
<tr>
<tr>
<td>2</td>
<td>Category 2</td>
<td><button id="edit_category">Edit</button></td>
<tr>
</tbody>
</table>
i want to show detail row to modal if i click the edit button in row