Menu icon Foundation

Developer | Vancouver, BC

My Posts

No Content

My Comments

Andrew Munroe commented on Andrew Brown's post over 5 years

Glad it was resolved. And as a handy tip for future reference, rather than attaching screenshots of code and sending the dropbox link, try using websites like http://jsfiddle.net or http://codepen.io - it's much easier for people to work with your code and help you out if they can edit it directly.

Andrew Munroe commented on Andrew Brown's post over 5 years

Hi Rui, if you inspect your menu, are the submenu items wrapped in <ul class="dropdown"></ul>?

Andrew Munroe commented on chegoon's post over 5 years

Hello. I was having the same issue - it's possible that this is a bug. Someone opened an issue about this on GitHub. According to that poster, there's something wrong in the foundation.reveal.js, but I can't figure out what that might be. Specifically, he lists these references to flex-video. The solution that he offers didn't work for me.

     close_video : function (e) {
      var video = $(this).find('.flex-video'),
          iframe = video.find('iframe');

      if (iframe.length > 0) {
        iframe.attr('data-src', iframe[0].src);
        iframe.attr('src', 'about:blank');
        video.hide();
      }
    },

    open_video : function (e) {
      var video = $(this).find('.flex-video'),
          iframe = video.find('iframe');

      if (iframe.length > 0) {
        var data_src = iframe.attr('data-src');
        if (typeof data_src === 'string') {
          iframe[0].src = iframe.attr('data-src');
        } else {
          var src = iframe[0].src;
          iframe[0].src = undefined;
          iframe[0].src = src;
        }
        video.show();
      }
    },

As a temporary solution, you can either remove the flex-video divs or create a new class called flex-video-new (or similar). Then style the flex-video-new class in the exact same way as the regular flex-video. That worked for me and still kept the iframe videos responsive.

Posts Followed


Following

    No Content

Followers

My Posts

No Content

My Comments

You commented on Andrew Brown's post over 5 years

Glad it was resolved. And as a handy tip for future reference, rather than attaching screenshots of code and sending the dropbox link, try using websites like http://jsfiddle.net or http://codepen.io - it's much easier for people to work with your code and help you out if they can edit it directly.

You commented on Andrew Brown's post over 5 years

Hi Rui, if you inspect your menu, are the submenu items wrapped in <ul class="dropdown"></ul>?

You commented on chegoon's post over 5 years

Hello. I was having the same issue - it's possible that this is a bug. Someone opened an issue about this on GitHub. According to that poster, there's something wrong in the foundation.reveal.js, but I can't figure out what that might be. Specifically, he lists these references to flex-video. The solution that he offers didn't work for me.

     close_video : function (e) {
      var video = $(this).find('.flex-video'),
          iframe = video.find('iframe');

      if (iframe.length > 0) {
        iframe.attr('data-src', iframe[0].src);
        iframe.attr('src', 'about:blank');
        video.hide();
      }
    },

    open_video : function (e) {
      var video = $(this).find('.flex-video'),
          iframe = video.find('iframe');

      if (iframe.length > 0) {
        var data_src = iframe.attr('data-src');
        if (typeof data_src === 'string') {
          iframe[0].src = iframe.attr('data-src');
        } else {
          var src = iframe[0].src;
          iframe[0].src = undefined;
          iframe[0].src = src;
        }
        video.show();
      }
    },

As a temporary solution, you can either remove the flex-video divs or create a new class called flex-video-new (or similar). Then style the flex-video-new class in the exact same way as the regular flex-video. That worked for me and still kept the iframe videos responsive.

Posts Followed

Following

  • No Content

Followers

  • No Content