[accordion] - manually opening a panel for a newb using the activate function
Hi.
I am trying to open a accordion panel with a href tag using the
"activate" command.
All the demo pages I've seen just confuse me more. Can some one
please point me to a simple example?
The accordian is working, but I can;t figure out how to manually open
panels using activate
I've seen tons of people try, but no examples or answers on these
forums. I'm sure its easy if you wrote jQuery or the plug in.
here's what I got.
<script type="text/javascript">
window.addEvent('domready', function() {
var accordion = new Accordion('h2.atStart', 'div.atStart', {
opacity: true,
active: false,
onActive: function(toggler, element){
toggler.setStyle('color', '#09C');
},
onBackground: function(toggler, element){
toggler.setStyle('color', '#4f687C');
}
}, $('quickLink'));
});
</script>
<a href="##" onclick="$('.selector').accordion('activate', 0);
">Step 1</a> <a href="##" onclick="$('.selector').accordion
('activate', 1);
">Step 2</a>
<div id-"quickLink">
<h2 class="toggler atStart">Step 1</h2>
<div class="element atStart">
Step 1 is to not freak out when you can't figure out how to
call a simple function.
</div>
<h2 class="toggler atStart">Step 2</h2>
<div class="element atStart">
Step 2 is to post the attempt and see fi someone can shed
some light.
</div>
<h2 class="toggler atStart">Step 3</h2>
<div class="element atStart">
Step 3 is to make a web page documenting how to do this
simple thing so other people can find it with google. Certainly a
better example of how to do this can be made, we're not all rocket
scientists
Thanks a lot.
</div>
</div>