Event.observe(window, "load", function(){ var acc01 = new accordion("acc01", { classNames : { toggle : "accordion_toggle", toggleActive : "accordion_toggle_active", content : "accordion_content" } }); var acc02 = new accordion("acc02", { classNames : { toggle : "accordion_toggle", toggleActive : "accordion_toggle_active", content : "accordion_content" } }); var n_acc01 = new accordion("n_acc01", { classNames : { toggle : "nested_accordion_toggle", toggleActive : "nested_accordion_toggle_active", content : "nested_accordion_content" } }); var n_acc02 = new accordion("n_acc02", { classNames : { toggle : "nested_accordion_toggle", toggleActive : "nested_accordion_toggle_active", content : "nested_accordion_content" } }); var n_acc03 = new accordion("n_acc03", { classNames : { toggle : "nested_accordion_toggle", toggleActive : "nested_accordion_toggle_active", content : "nested_accordion_content" } }); var n_acc04 = new accordion("n_acc04", { classNames : { toggle : "nested_accordion_toggle", toggleActive : "nested_accordion_toggle_active", content : "nested_accordion_content" } }); var n_acc05 = new accordion("n_acc05", { classNames : { toggle : "nested_accordion_toggle", toggleActive : "nested_accordion_toggle_active", content : "nested_accordion_content" } }); var n_acc06 = new accordion("n_acc06", { classNames : { toggle : "nested_accordion_toggle", toggleActive : "nested_accordion_toggle_active", content : "nested_accordion_content" } }); var n_acc07 = new accordion("n_acc07", { classNames : { toggle : "nested_accordion_toggle", toggleActive : "nested_accordion_toggle_active", content : "nested_accordion_content" } }); var n_acc08 = new accordion("n_acc08", { classNames : { toggle : "nested_accordion_toggle", toggleActive : "nested_accordion_toggle_active", content : "nested_accordion_content" } }); var n_acc09 = new accordion("n_acc09", { classNames : { toggle : "nested_accordion_toggle", toggleActive : "nested_accordion_toggle_active", content : "nested_accordion_content" } }); acc01.activate($$("#acc01 .accordion_toggle")[0]); /* オープン設定(デフォルトは全て閉じるためコメントアウト) acc01.activate($$("#acc01 .accordion_toggle")[0]); acc02.activate($$("#acc02 .accordion_toggle")[0]); n_acc01.activate($$("#n_acc01 .nested_accordion_toggle")[0]); */ }, true);