Grow your CSS skills. Land your dream job.

jquery automatic accordion: Select/get the active panel of accordion

  • # March 7, 2013 at 10:58 am

    hi guys, I’m working with a jquery accordion plugin. Its automatic, so even if you’re not hovering or clicking over it, the panel moves smoothly at a set time.
    My problem is I want to add some effects on it like when the panel opens or gets active a child element (e.g Paragraph ) fades in.

    $(‘#accordion > li’)._**what should I use here?**_(
    function () {
    var $this = $(this);
    $this.stop().animate({‘width':’480px’},500);
    $(‘.heading’,$this).stop(true,true).fadeOut();
    $(‘.bgDescription’,$this).stop(true,true).slideDown(500);
    $(‘.description’,$this).stop(true,true).fadeIn();
    },
    function () {
    var $this = $(this);
    $this.stop().animate({‘width':’115px’},1000);
    $(‘.heading’,$this).stop(true,true).fadeIn();
    $(‘.description’,$this).stop(true,true).fadeOut(500);
    $(‘.bgDescription’,$this).stop(true,true).slideUp(700);
    }
    );

    What jquery api should I use to get the current/active/opened panel and bring in some effect. Thanks

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".