2016-10-16 5 views
0

내 jQuery를 스크립트가되면에서 열기 여러 패널 : 그래서jQuery를 아코디언 -

jQuery(document).ready(function($) { 
    $("#accordions-727.accordions").accordion({ 
     collapsible: true, active: "false", 
     event: "click", 
     heightStyle: "content", 
    }) 
}) 

내가 첫 번째 탭을 열고 열어두고, 내가 두 번째 탭을 첫 번째 closes.How를 열 때 다음 할 수있는 경우 한 번에 여러 패널을 열어 볼까요?

나는 here을 언급하지만 아무도

+1

가능 중복 [오픈 여러 섹션을 유지 jQuery를 UI 아코디언? (http://stackoverflow.com/questions/3479447/jquery-ui-accordion-that-keeps-multiple-sections-open) – nycynik

+0

jquery 사이의 버전을 확인하시기 바랍니다 [그] (http://stackoverflow.com/questions/15702444/jquery-ui-accordion-open-multiple-panels-at-once)와 귀하의 코드 – nivendha

+0

내 버전은 1.9입니다. 2 @ 니벤 다하 – Stew

답변

0

여러 아코디언으로 돌려시겠습니까 작동하는 것 같다없는 사건에 대한 확인 작업을 한 것을 시도?

<!doctype html> 
<html lang="en"> 
<head> 
    <meta charset="utf-8"> 
    <link rel="stylesheet" href="./jquery-ui.css"> 
    <script src="./jquery-1.12.4.js"></script> 
    <script src="./jquery-ui.js"></script> 
    <script> 
    $(function() { 
     $(".myaccordion").each(function(index) {$(this).accordion({collapsible:true});}); 
    }); 
    </script> 
</head> 
<body> 
<div class="myaccordion"> 
    <h3>Section 1</h3> 
    <div><p>one</p></div> 
</div> 
<div class="myaccordion"> 
    <h3>Section 2</h3> 
    <div><p>two</p></div> 
</div> 
</body> 
</html> 
관련 문제