확장 가능한 일부 테이블 행이 있지만 한 행을 확장 할 때 다른 모든 축소 할 때 그렇게 만드는 방법을 모르겠습니다.Jquery 한 번에 한 행을 확장하십시오.
JQuery와 :
$(document).ready(function() {
$('.expandable').click(function() {
$(this).nextAll('tr').each(function() {
if ($(this).is('.expandable')) {
return false;
}
$(this).toggle(350);
});
});
$('.expandable').nextAll('tr').each(function() {
if (!($(this).is('.expandable'))) $(this).hide();
});
});
HTML :
$('.expandable').click(function() {
$(".expandable").slideUp();
$(this).slideDown();
});
이것을 재현하는 데 필요한 'HTML'및 'CSS'를 제공하십시오. –