Сообщение от denis_kontarev
|
А можно реализовать с .toggle();
|
<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<style type="text/css">
tbody.st {
display : table-row-group;
}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script>
$(function() {
$('.spoiler').on('click', '.trigger', function(event) {
$('.st', event.delegateTarget).toggle();
});
});
</script>
</head>
<body>
<div class="spoiler">
<input class="trigger">
<table>
<tbody class="st" style="display: none;"><tr>
<td>ТЕКСТ...</td>
</tr></tbody>
</table>
</div>
<div class="spoiler">
<input class="trigger">
<table>
<tbody class="st" style="display: none;"><tr>
<td>ТЕКСТ...</td>
</tr></tbody>
</table>
</div>
<div class="spoiler">
<input class="trigger">
<table>
<tbody class="st" style="display: none;"><tr>
<td>ТЕКСТ...</td>
</tr></tbody>
</table>
</div>
</body>
</html>