Skip to content
This repository has been archived by the owner on Apr 4, 2018. It is now read-only.

Commit

Permalink
Worked on the accordion disable section demo.
Browse files Browse the repository at this point in the history
  • Loading branch information
deleteme committed Sep 8, 2009
1 parent b04c19a commit 207e158
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions index.html
Expand Up @@ -22,10 +22,21 @@
mutuallyExclusive: false
});

accordionDisableAll = new Accordion('accordion-disable-all', { disabled: true });
accordionDisableAll = new Accordion('accordion-disable-all');
$('toggle-disabled').observe('click', function(){
accordionDisableAll.disabled = !accordionDisableAll.disabled;
});

accordionDisableSection = new Accordion('accordion-disable-section');
accordionDisableSection.sections.first().disabled = true;

(function(){
function toggleSection(i, e){
accordionDisableSection.sections[i].disabled = !accordionDisableSection.sections[i].disabled;
}
$$('button.toggle-section-disabled').each(function(button, i){
button.observe('click', toggleSection.curry(i));
});
})()

});
</script>
Expand Down Expand Up @@ -64,7 +75,7 @@ <h2>Show one at a time</h2>
</ul>

<h2>Show more than one at a time</h2>

<ul id="accordion-not-mutually-exclusive">
<li class="section">
<a href="#one" class="title"><span>First Section</span></a>
Expand All @@ -90,7 +101,7 @@ <h2>Show more than one at a time</h2>
<div style="float: right; width: 45%;">

<h2>Disable all of the accordion interactivity</h2>

<button id="toggle-disabled">Toggle Disabled</button>
<ul id="accordion-disable-all">
<li class="section">
<a href="#one" class="title"><span>First Section</span></a>
Expand All @@ -112,7 +123,12 @@ <h2>Disable all of the accordion interactivity</h2>
</li>
</ul>
<h2>Disable an accordion section's interactivity</h2>

<ol>
<li><button class="toggle-section-disabled">Toggle Section Disabled</button></li>
<li><button class="toggle-section-disabled">Toggle Section Disabled</button></li>
<li><button class="toggle-section-disabled">Toggle Section Disabled</button></li>
</ol>

<ul id="accordion-disable-section">
<li class="section">
<a href="#one" class="title"><span>First Section</span></a>
Expand Down

0 comments on commit 207e158

Please sign in to comment.