I recently downloaded FX.Slide and MooTools, and I've been trying to get them to work on my site. I've gotten them to work pretty well, but there's just one little problem. I want the default state to be closed, so that when the visitor comes to my site, the "slider" div is in the closed state, rather than open. Here's the site where I'm trying to get this to work. The JavaScript code is the following:
window.addEvent('domready', function() {
var status = {
'false': 'open',
'true': 'close'
};
//-vertical
var myVerticalSlide = new Fx.Slide('vertical_slide');
$('v_slidein').addEvent('click', function(e){
e.stop();
myVerticalSlide.slideIn();
});
$('v_slideout').addEvent('click', function(e){
e.stop();
myVerticalSlide.slideOut();
});
$('v_toggle').addEvent('click', function(e){
e.stop();
myVerticalSlide.toggle();
});
$('v_hide').addEvent('click', function(e){
e.stop();
myVerticalSlide.hide();
$('vertical_status').set('html', status[myVerticalSlide.open]);
});
$('v_show').addEvent('click', function(e){
e.stop();
myVerticalSlide.show();
$('vertical_status').set('html', status[myVerticalSlide.open]);
});
// When Vertical Slide ends its transition, we check for its status
// note that complete will not affect 'hide' and 'show' methods
myVerticalSlide.addEvent('complete', function() {
$('vertical_status').set('html', status[myVerticalSlide.open]);
});
So what do I need to change in this here code? And I'm sorry if the answer is obvious, but I barely know any JavaScript. Thanks.