簡體   English   中英

jQuery手風琴不能在IE 9中工作?

[英]Jquery accordions not working in IE 9?

為什么在IE 9中不起作用? jsfiddle它拒絕單擊打開,在IE9以外的所有瀏覽器上都可以正常工作>我只是似乎不知道為什么! 任何幫助都非常有用。

/* Accordions */
$(".acc_item").click(function(){

    $(this).siblings().children(".accordion_content").not($(this).find(".accordion_content")).slideUp(600,'easeInOutExpo');
    $(this).siblings().children(".accordion").not($(this).find(".accordion")).removeClass("active_acc");

    $(this).find(".accordion").next(".accordion_content").slideToggle(600,'easeInOutExpo');

    if($(this).find(".accordion").hasClass('active_acc')){
        $(this).find(".accordion").removeClass("active_acc");
    }else{
        $(this).find(".accordion").addClass("active_acc");
    }
});

// Open First item if accordion whenever set so
setTimeout(function(){$(".acc_is_open").delay(1500).click();},600); 
/* Accordions::END */

試試這個: 演示

$(".acc_item").click(function () {
    $(this).siblings().children(".accordion_content").slideUp(600, 'easeInOutExpo');
    $(this).siblings().children(".accordion").removeClass("active_acc");

    $(this).find(".accordion_content").slideToggle(600, 'easeInOutExpo');

    if ($(this).find(".accordion").hasClass('active_acc')) {
        $(this).find(".accordion").removeClass("active_acc");
    } else {
        $(this).find(".accordion").addClass("active_acc");
    }
});

setTimeout(function () {
    $(".acc_is_open").delay(1500).click();
}, 600);

嘗試:

$(this).find(".accordion_content").slideToggle(600,'easeInOutExpo');

還要注意,我已經包含了easing插件。

在這里擺弄

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM