You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

31 lines
614 B

  1. import $ from 'jquery';
  2. class IHKSocialBox {
  3. constructor(socialBox) {
  4. this.box = socialBox.addClass('initiated')
  5. this.tabindexSet = false;
  6. this.checkIframe();
  7. }
  8. checkIframe() {
  9. setTimeout(() => {
  10. const iframe = this.box.find('iframe');
  11. if (iframe.length) {
  12. iframe.attr('tabindex', '-1');
  13. }
  14. else {
  15. this.checkIframe();
  16. }
  17. }, 1000)
  18. }
  19. }
  20. export default IHKSocialBox;
  21. $('body').on('ihk-init dynamic-component-loaded gfi-dynamic-init', function () {
  22. $('.social-box:not(.initiated)').each(function () {
  23. new IHKSocialBox($(this));
  24. })
  25. })