callback in removeClass function jQuery

0

I'm trying to use callback in the removeClass function but it's not working, does anyone know what's wrong?

I need to run removeAttr only after removeClass is finished.

    $(".context_menu_pai").removeClass('open' , function() {
        $(".context_menu_pai").removeAttr("style");
    });
    
asked by anonymous 14.07.2017 / 00:02

1 answer

2

What callback ?! This method does not accept callback!

As there are no asynchronous operations involved, just chain the calls, like this:

$(".context_menu_pai").removeClass('open').removeAttr("style");
    
14.07.2017 / 00:08