Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 

31 linhas
726 B

  1. import $ from 'jquery';
  2. class IHKTopicTeasers {
  3. constructor(section) {
  4. this.section = section.addClass('initiated');
  5. this.cols = section.find('.col');
  6. const fullOffset = Math.ceil(this.cols.length / 3) * 3 - this.cols.last().index() - 1;
  7. if (fullOffset === 0) {
  8. return;
  9. }
  10. let firstHalfWidth = this.cols.length - fullOffset * 2;
  11. if (firstHalfWidth < 0) {
  12. firstHalfWidth = 0;
  13. }
  14. this.cols.eq(firstHalfWidth).addClass('width-half').nextAll().addClass('width-half');
  15. }
  16. }
  17. export default IHKTopicTeasers;
  18. $('body').on('ihk-init dynamic-component-loaded gfi-dynamic-init', function () {
  19. $('.topics:not(.initiated)').each(() => {
  20. new IHKTopicTeasers($(this));
  21. });
  22. })