$(function() {
$("table.section thead").click(function() {
if ($(this).next("table.section tbody").style.display == "block"){
$(this).next("table.section tbody").slideUp("slow");
}
if ($(this).next("table.section tbody").style.display == "none"){
$(this).next("table.section tbody").slideDown("slow");
}
});
});
이 문제를 해결하는 방법을 알지 못해 어떤 도움을 주셔서 감사합니다.이 Jquery 함수의 문제점은 무엇입니까?
UPDATE :
나는 다음과 같은 기능을 사용하려고했다. 그것은 나에게 문제를 제공
$(function() {
$("table.section thead").click(function() {
$(this).next("table.section tbody").slideToggle("slow");
});
});
, (THEAD 때 붕괴하고 그것을 확장하고 다시 축소를 클릭, 그래서 항상 붕괴 될 것이다). 그래서 맨 위에있는 기능을 얻으려고합니다.
이 무엇을 달성하고 싶어를? –
나는 클릭 이벤트가 모든 "table.section thead"에 나타나기를 원할 때 클릭하면 테이블의 tbody가 숨겨집니다. – Amra