Menu icon Foundation

My Posts



My Comments

Aria Rajasa commented on Aria Rajasa's post over 5 years

Ok found the solution, I changed the timeout to 0 so it would disappear right away on mouseleave so that when hovering a new link, the old one goes away instantly. Here's the code to change on foundation.dropdown.js

self.timeout = setTimeout(function () {
            if ($this.data('dropdown')) {
              var settings = $this.data('dropdown-init');
              if (settings.is_hover) self.close.call(self, $('#' + $this.data('dropdown')));
            } else {
              var target = $('[data-dropdown="' + $(this).attr('id') + '"]'),
                  settings = target.data('dropdown-init');
              if (settings.is_hover) self.close.call(self, $this);
            }
          }.bind(this), 150);

Change 150 to 0.

Aria Rajasa commented on Aria Rajasa's post over 5 years

no one?

Posts Followed

No Content

Following

    No Content

Followers

My Posts


My Comments

You commented on Aria Rajasa's post over 5 years

Ok found the solution, I changed the timeout to 0 so it would disappear right away on mouseleave so that when hovering a new link, the old one goes away instantly. Here's the code to change on foundation.dropdown.js

self.timeout = setTimeout(function () {
            if ($this.data('dropdown')) {
              var settings = $this.data('dropdown-init');
              if (settings.is_hover) self.close.call(self, $('#' + $this.data('dropdown')));
            } else {
              var target = $('[data-dropdown="' + $(this).attr('id') + '"]'),
                  settings = target.data('dropdown-init');
              if (settings.is_hover) self.close.call(self, $this);
            }
          }.bind(this), 150);

Change 150 to 0.

You commented on Aria Rajasa's post over 5 years

no one?

Posts Followed

No Content

Following

  • No Content

Followers

  • No Content