MooTools - Accordion

This is a discussion on "MooTools - Accordion" within the JavaScript Forum section. This forum, and the thread "MooTools - Accordion are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices


Reply
 
LinkBack Thread Tools
  #21 (permalink)  
Old Nov 3rd, 2007, 16:08
Ed Ed is offline
Highly Reputable Member
Join Date: Jul 2007
Location: Cork, Ireland
Posts: 687
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: MooTools - Accordion

If I wanted the box to be hidden when the page is first displayed, how would I do that?

And in something also stupid-with my CSS and HTML how would I split this box into two columns? I don't want to mess anything up!

Thanks,
Ed
Last Blog Entry: Happy New Year! (Dec 31st, 2007)

Last edited by Ed; Nov 3rd, 2007 at 20:10.
Reply With Quote
  #22 (permalink)  
Old Nov 4th, 2007, 12:25
Ed Ed is offline
Highly Reputable Member
Join Date: Jul 2007
Location: Cork, Ireland
Posts: 687
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: MooTools - Accordion

Hello?
Last Blog Entry: Happy New Year! (Dec 31st, 2007)
Reply With Quote
  #23 (permalink)  
Old Nov 4th, 2007, 13:08
c010depunkk's Avatar
SuperMember

SuperMember
Join Date: Apr 2007
Location: Willich, Germany
Age: 20
Posts: 593
Blog Entries: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to c010depunkk
Re: MooTools - Accordion

Just add "mySlide.hide();" in the onload() function.
Reply With Quote
  #24 (permalink)  
Old Nov 4th, 2007, 14:03
Ed Ed is offline
Highly Reputable Member
Join Date: Jul 2007
Location: Cork, Ireland
Posts: 687
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: MooTools - Accordion

This is my code. It doesn't seem to work, and I'm terribly confused. Adding this make the "toggle" function not work, and it still displays the div.

here's the page: http://simplifiedimpact.com/contact.html#

HTML: Select all
<script type="text/javascript">
            window.addEvent('domready', function(){
                //-vertical
                
                var mySlide = new Fx.Slide('test');
                
                $('toggle').addEvent('click', function(e){
                    e = new Event(e);
                    mySlide.toggle();
                    e.stop();
                });

},
    'onload': function(){
        mySlide.hide(); // When page loads, hide
    }
});
                
                
                
                //--horizontal
                
                var mySlide2 = new Fx.Slide('test2', {mode: 'horizontal'});
                
                $('slidein2').addEvent('click', function(e){
                    e = new Event(e);
                    mySlide2.slideIn();
                    e.stop();
                });
                
                $('slideout2').addEvent('click', function(e){
                    e = new Event(e);
                    mySlide2.slideOut();
                    e.stop();
                });
                
                $('toggle2').addEvent('click', function(e){
                    e = new Event(e);
                    mySlide2.toggle();
                    e.stop();
                });
                
                $('hide2').addEvent('click', function(e){
                    e = new Event(e);
                    mySlide2.hide();
                    e.stop();
                });
            });  
    </script>
Help is extremely appreciated,
Ed
Last Blog Entry: Happy New Year! (Dec 31st, 2007)

Last edited by Ed; Nov 4th, 2007 at 14:08.
Reply With Quote
  #25 (permalink)  
Old Nov 4th, 2007, 15:28
c010depunkk's Avatar
SuperMember

SuperMember
Join Date: Apr 2007
Location: Willich, Germany
Age: 20
Posts: 593
Blog Entries: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to c010depunkk
Re: MooTools - Accordion

Put the hide() directly under the declaration and initialization of the mySlide variables:
HTML: Select all
var mySlide = new Fx.Slide('test');
                
                $('toggle').addEvent('click', function(e){
                    e = new Event(e);
                    mySlide.toggle();
                    e.stop();
                });
mySlide.hide(); // When page loads, hide
Reply With Quote
  #26 (permalink)  
Old Nov 8th, 2007, 00:11
Highly Reputable Member
Join Date: Sep 2007
Age: 15
Posts: 717
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: MooTools - Accordion

Are you still having problems? If not, please mark this thread as solved via thread tools at the top. Thanks.
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
What's up with MooTools and Script.aculo.us? CloudedVision JavaScript Forum 2 Apr 19th, 2008 12:00
mootools tutorial? CloudedVision JavaScript Forum 2 Feb 8th, 2008 02:08
MooTools Accordion Advanced Ed JavaScript Forum 6 Dec 31st, 2007 18:01
accordion help karloff JavaScript Forum 0 May 10th, 2007 14:38


All times are GMT. The time now is 04:37.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43