const $ = require('jquery');
class Table {
  constructor(table) {
    table.addClass('initiated').wrap($('<div class="responsive-table" />'));
  }
}

$('body').on('ihk-init dynamic-component-loaded gfi-dynamic-init', function () {
  $('.richtext table:not(.initiated)').each(function(i) {
    new Table($(this));
  });
})
