Member Offer
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

A mootools-powered slide down div question...

Discussion in 'Website Design Forum:' started by bamme, Dec 1, 2009.

  1. bamme

    bamme Senior Member

    Hi everyone

    I'm a beginner with jquery/javascript but this is the first time ive looked at mootools.. :S

    Im having a bit of trouble figuring how to do something with the toggling slide down/up divs featured here:

    Club Charts, Pop & Dance mp3s - Sam Smith UK Pop & Dance Artist

    I'd like to know if its possible to make one music list collapse if the other is clicked - therefore having just one open at a time?

    Can anyone help? Or direct me to a resource? I dont really mind if its from a diff library, but itd be ideally using mootools, or in javascript - as other parts of the site use mootools.

  2. tbwcf

    tbwcf Active Member

    I can tell you how to with jquery but am not familar with mootools.

    With jQuery

    $(document).ready(function() {

    $('div.accordionButton').click(function() {

    if($(this).next().is(':visible')) {
    } else {


    your div's should have the class accordionButton and accordionContent respectivley.

    source - Stupid Simple jQuery Accordion Menu

    although I would advise you research/work it out with mootools if you've used that for everything else. It doesn't make sense to load both libaries when they can both do the same.
  3. bamme

    bamme Senior Member

    thanks very much - I did think myself to perhaps remove mootools and replace all the effects currently in place with jquery, think this will be quicker overall!

    Thanks for the help :)

Share This Page