Menu icon Foundation

My Posts

No Content

My Comments

Patricia Palacios commented on Detlef Fluess's post over 4 years

Hi,

@Detlef, did you find a solution? I am having the same problem with my website: "sometimes" parts of it don't load at all. I have seen it happen in safari, google chrome and, I think, also Firefox. I have the feeling that it affects the parts of the page where I am using the data-interchange functionality, whether it is an image or a html file. But I am unable to reproduce it, it only happens sometimes, so I don't know how to start looking for a solution.

Patricia Palacios commented on Philip Meissner's post over 4 years

Well, at the end I was able to find a solution, it isn’t that “pretty” since I had to change the code of the set_expedition_position directly in foundation.magellan.js. But here it is:

set_expedition_position : function() {
      var self = this;
      $('[' + this.attr_name() + '=fixed]', self.scope).each(function(idx, el) {
        var expedition = $(this),
            settings = expedition.data('magellan-expedition-init'),
            styles = expedition.attr('styles'), // save styles
            top_offset, fixed_top;

    // PP hack start
    // ignore the menu sticked at the top of the screen when calculating the offset!!
                if (expedition.attr('class') == 'fixed'){
      console.log('ignore this offset!!');
    } else {
      console.log('take this offset into consideration!!');
      expedition.attr('style', '');
      top_offset = expedition.offset().top + settings.threshold;
      // this is specific for my page:
                        // I am ignoring the offset if smaller than 300 px because that
      // means that the picture on top of the menu hasn't loaded yet
      if (top_offset < 300){
        console.log('ignore top_offset, which is:', top_offset);
      }
      else {
        console.log('use top_offset, which is:', top_offset);
        //set fixed-top by attribute
        fixed_top = parseInt(expedition.data('magellan-fixed-top'));
        if(!isNaN(fixed_top))
          self.settings.fixed_top = fixed_top;

        expedition.data(self.data_attr('magellan-top-offset'), top_offset);
        expedition.attr('style', styles);
      }
    }
    // PP hack end
      });
    }

Patricia Palacios commented on Philip Meissner's post over 4 years

Still having the same problem with Foundation 5.4.7. The "sticky" menu only works properly (with that I mean that appears/disappears at the right position) if I wait to do anything until the whole page has loaded.

  1. If I start scrolling before the page has loaded completely, the magellan sticky menu appears at the top of the page before I have reached my submenu.

  2. If I click in one of the items of my submenu before the page has loaded completely, the page skips to the item correctly and the sticky menu is at the top, but it disappears as soon as I scroll up a little bit (it doesn't stay "sticky" until I have gone back up to the position of my submenu)

I see these behaviors in all the browsers I have tested so far (Safari, Firefox and Chrome). Also, once it happens, it keeps happening unless you reload the page or resize it (which, as Thomas Janotta said, no visitor will do).

Also, the solution proposed by Lincoln mitchell ([data-magellan-expedition-clone] { display: none; }) doesn’t work for me, because it just hides the submenu from its position in the page, but the sticky still appears too soon or disappears too early.

Here is the page I am working on: http://www.euskoguide.com/indexFoundation2.html

Please help!!

Posts Followed



Following

    No Content

Followers

My Posts

No Content

My Comments

You commented on Detlef Fluess's post over 4 years

Hi,

@Detlef, did you find a solution? I am having the same problem with my website: "sometimes" parts of it don't load at all. I have seen it happen in safari, google chrome and, I think, also Firefox. I have the feeling that it affects the parts of the page where I am using the data-interchange functionality, whether it is an image or a html file. But I am unable to reproduce it, it only happens sometimes, so I don't know how to start looking for a solution.

You commented on Philip Meissner's post over 4 years

Well, at the end I was able to find a solution, it isn’t that “pretty” since I had to change the code of the set_expedition_position directly in foundation.magellan.js. But here it is:

set_expedition_position : function() {
      var self = this;
      $('[' + this.attr_name() + '=fixed]', self.scope).each(function(idx, el) {
        var expedition = $(this),
            settings = expedition.data('magellan-expedition-init'),
            styles = expedition.attr('styles'), // save styles
            top_offset, fixed_top;

    // PP hack start
    // ignore the menu sticked at the top of the screen when calculating the offset!!
                if (expedition.attr('class') == 'fixed'){
      console.log('ignore this offset!!');
    } else {
      console.log('take this offset into consideration!!');
      expedition.attr('style', '');
      top_offset = expedition.offset().top + settings.threshold;
      // this is specific for my page:
                        // I am ignoring the offset if smaller than 300 px because that
      // means that the picture on top of the menu hasn't loaded yet
      if (top_offset < 300){
        console.log('ignore top_offset, which is:', top_offset);
      }
      else {
        console.log('use top_offset, which is:', top_offset);
        //set fixed-top by attribute
        fixed_top = parseInt(expedition.data('magellan-fixed-top'));
        if(!isNaN(fixed_top))
          self.settings.fixed_top = fixed_top;

        expedition.data(self.data_attr('magellan-top-offset'), top_offset);
        expedition.attr('style', styles);
      }
    }
    // PP hack end
      });
    }

You commented on Philip Meissner's post over 4 years

Still having the same problem with Foundation 5.4.7. The "sticky" menu only works properly (with that I mean that appears/disappears at the right position) if I wait to do anything until the whole page has loaded.

  1. If I start scrolling before the page has loaded completely, the magellan sticky menu appears at the top of the page before I have reached my submenu.

  2. If I click in one of the items of my submenu before the page has loaded completely, the page skips to the item correctly and the sticky menu is at the top, but it disappears as soon as I scroll up a little bit (it doesn't stay "sticky" until I have gone back up to the position of my submenu)

I see these behaviors in all the browsers I have tested so far (Safari, Firefox and Chrome). Also, once it happens, it keeps happening unless you reload the page or resize it (which, as Thomas Janotta said, no visitor will do).

Also, the solution proposed by Lincoln mitchell ([data-magellan-expedition-clone] { display: none; }) doesn’t work for me, because it just hides the submenu from its position in the page, but the sticky still appears too soon or disappears too early.

Here is the page I am working on: http://www.euskoguide.com/indexFoundation2.html

Please help!!

Posts Followed

Following

  • No Content

Followers

  • No Content