reload visual composer grid after ajax call

Solution:

tl;dr

put your custom javascript code in here:

$(window).bind( 'grid:items:added', function(){ 
  // add some logic here
});

if you need to make some logic after Visual Composer grid has been loaded then do it like this (I’m pasting my code from some site):

// catch VISUAL COMPOSER AFTER GRID ITEMS ARE LOADED .. hook and update date strings,, ONCE!
$(window).bind( 'grid:items:added', function(){
    if ( ! $( 'body' ).attr('masonicaDone' ) == "1" ){
        $('.enddate, .startdate').each( function(ix, el){
            var tmm = sDate( TIME( $(el).text().trim() ), lang ) + ' ∙ ' + sTime( TIME( $(el).text().trim() ), lang  );
            $(el).text( tmm );
        });
        $( 'body' ).attr('masonicaDone', 1);
    }
});

the main thing is to bind to 'grid:items:added' event, that runs after ajax data has come down the wire,, in my example I’m formating date to local format (and not to native php date format, WP)

Also, very important to have is to add somekind of flag (I’m attr’ing on body) to not do it more then once (I’d endup with formating the datestring twice and have errors) but only first time (on after ajax). Note that this same event is fired on clicking on filter buttons (portfolio categories most of the time) and who knows maybe some transitions also..