Created
August 16, 2008 19:25
-
-
Save bryanjswift/5739 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.addEvent('domready', function() { | |
//create our Accordion instance | |
var myAccordion = new Accordion($('accordion'), 'a.toggler', 'div.element', { | |
start:'all-close', | |
alwaysHide: true, | |
opacity: true, | |
onActive: function(toggler, element){ | |
toggler.setStyle('background-position', '0 -30px'); | |
}, | |
onBackground: function(toggler, element){ | |
toggler.setStyle('background-position', '0 0'); | |
} | |
}); | |
// added an onComplete event which changes the height of the wrapping div created by Fx.Slide to auto | |
var myVerticalSlide = new Fx.Slide('vertical_slide',{ | |
'onComplete': function() { | |
myVerticalSlide.wrapper.setStyle('height','auto'); | |
} | |
}).hide(); | |
$('v_toggle').addEvent('click', function(e){ | |
e.stop(); | |
myVerticalSlide.toggle(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment