Jquery slideToggle - call before completion

Can anyone suggest how to make a call in slideToggle mode before opening / closing it? Here is my situation:

$('.accordion .d_row .c_row').live('click', function() {

    $(this).nextAll('div.details').slideToggle(function() {

        if($(this).is(":hidden")){
            // do something
        } else {
            // do something
        }

    });
});

If I call anything where // makes a comment, it gets while it opens. Is there a way to call, for example, a function first, then execute silde?

Greetings

+3
source share
1 answer

You can just run your code before calling slideToggle.

+1
source

All Articles