...

mootools slider problem.

KarlBee
12-11-2007, 09:56 AM
Good morning all.

I am currently working on a theme that uses mootools javascript framework and have come to a grinding halt trying to achieve the following for my comment form:

The user clicks comments and the comments slide down just below my entry but do not show the comment form, just a link to 'add a comment'. When the user clicks 'add a comment' the comment form slides down from within the first slide.

Here is the code for the first slide:
http://paste-it.net/5177 but I am not sure how I modify this to allow 2 slides.



document.getElementById('info').style.display = "block";
var myCommentsFade = new Fx.Style('info', 'opacity').set(0);
var mySlide = new Fx.Slide('info');
$('toggle').addEvent('click', function(e){
e = new Event(e);
mySlide.toggle();
e.stop();

opacity = document.getElementById('info').getStyle('opacity');
if (opacity == 0) {
myCommentsFade.start(0,1);
} else {
myCommentsFade.start(1,0);
}
});
mySlide.hide();




Both sections (the comments and form) have their own container DIVs. Comments has 'info' and 'contactform'.

Any ideas on how to do this?

Thank you for your time

Karl



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum