When I have more than one <td>
and I click on my button it opens all list in the table, and I don't want that. I want to open it only in the <tr>
that one specifically.
I don't know how to target it individually only with one javascript code.
Html code:
<table class="block-IPs-table" id="block-IPs-table">
<thead>
</thead>
<tbody>
<tr class="odd gradeX">
<td class="widht-400 vertical-align-bottom">
<div class="menu-toggle-left clearfix pull-right">
<ul class="toggle-left clearfix">
<li class="">
<a href="#"><i class="fa fa-ban active-red fa-2x"></i></a>
</li>
<li class="">
<a href="#"><i class="fa fa-times fa-2x"></i></a>
</li>
</ul>
<button class="btn btn-toggle btn-left-click" type="button" id=""><i class="fa fa-ellipsis-h fa-2x" aria-hidden="false"></i></button>
</div><!-- menu toggle -->
</td>
</tr>
</tbody>
</table>
this is my javascript code:
var menuWrapper = $('.menu-toggle-left'),
button = menuWrapper.find('.btn-toggle'),
menu = menuWrapper.find('ul');
menu.hide()
$(".btn-toggle").on('click', function(){
menu.toggle("fast");
});