slideToggle 기술을 사용하여 응용 프로그램에 100 가지 이상의 정보를 표시하고 숨 깁니다. "모두 표시"및 "모두 숨기기"버튼이 있으며 슬라이드 쇼글 애니메이션을 표시하고 싶습니다 (모든 표시 및 숨기기 대신에). 그러나 IE6에서는 slideToggle이 각 요소에 적용될 때 실제로 느리게 실행됩니다.많은 요소에 대한 jQuery clean slide 토글
누구나 속도를 높이는 방법을 알고 있습니까? 또한 msg_head에있는 아이콘을 전환하고 있지만 속도가 느려지지는 않습니다. th slideToggle을 제거하고 표시/숨기기 (모두 표시/숨기기 모두)로 바꾼다면 괜찮습니다. 그러나 가능하면 애니메이션을 갖고 싶습니다.
<p class="msg_head" onclick="toggleSelection($(this));">Heading</p>
<div class="msg_body">
content
</div>
그리고 내 모두 표시하고 모든 기능을 숨기 ... 공식적으로
function toggleSelection(element) {
element.next("msg_body").slideToggle(250);
element.find(":first-child").toggleClass("ui-icon-circle-arrow-s");
element.find(":first-child").toggleClass("ui-icon-circle-arrow-e");
}
function showall() {
$(".msg_head").each(function() {
$(this).next(".msg_body:hidden").slideToggle(250);
$(this).find(":first-child").attr('class','ui-icon ui-icon-circle-arrow-s');
});
}
function hideall() {
$(".msg_head").each(function() {
$(this).next(".msg_body:visible").slideToggle(250);
$(this).find(":first-child").attr('class','ui-icon ui-icon-circle-arrow-e');
});
}
는 개별 toggleSection() 함수는 완벽하게 수행합니다. 그리고 showall과 hideall 함수로 slideToggle을 대체하면 show와 hide도 잘 작동합니다. 슬라이드가 보이지 않고 slideToggle 애니메이션을 얻을 수있는 방법이 있는지 정말 고민 중입니다.
그래, 나는 동의해야 할 것입니다. 나는이 것을 포기했다. – macca1