drcosmo wrote:Very nice tutorial. I have two more questions:
*/ When I open the page, none of the div's are displayed. How can i open the first by default?
*/ I have a little navigation-menu. I use the id "current" on my li-item to indicate the current item. How can i remove the current on the first item when another is clicked (and add the current id to the new item)?
Thanks in advance!
Oooh! I can actually help someone else!
If you want to display the first div, just put:
in there right after the line:
Conversely, if you wanted to show the last div, you could use:
- contents.getLast().slide('in');
It works in Firefox but throws an error in IE7, both using Mootools .1.2.1.
By the way, awesome tutorial. I struggled with this for hours using each() and it really was cumbersome. This is a very slick and clean solution. Thanks so much!