How to remove WP Bakery (Visual Composer) tabs animation

A client didn’t like the tab animation used by the WP Bakery (Visual Composer) WordPress plugin.
There aren’t any options to change this, however the nature of JavaScript means that you can override methods.
WP Bakery builds their JavaScript files as jQuery plugins so this example can be adapted to override the method of any jQuery plugin.

For WP Bakery add the following JavaScript to a file that is being used by your page or create a new one if necessary:

jQuery(function(){
    var _isAnimated = jQuery.fn.vcAccordion.Constructor.prototype.isAnimated;
    jQuery.fn.vcAccordion.Constructor.prototype.isAnimated = function() {
        return 0;
    }
});

This replaces the isAnimated function with one that just returns 0, making it think the animation is already complete.

For other jQuery plugins you will need to spend some time in your browser developer tools stepping through the code to see which function needs to be replaced.

With help from https://stackoverflow.com/questions/9137311/how-to-extend-twitter-bootstrap-plugin.

One Reply to “How to remove WP Bakery (Visual Composer) tabs animation”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.