Sha256: a45cddfdb0d1d6342281c240000511003d76afd8108f4c6eb82e46b1b47e4644

Contents?: true

Size: 933 Bytes

Versions: 3

Compression:

Stored size: 933 Bytes

Contents

(function ($){

  $.fn.foundationNavigation = function (options) {

    var lockNavBar = false;
    // Windows Phone, sadly, does not register touch events :(
    if (Modernizr.touch || navigator.userAgent.match(/Windows Phone/i)) {
      $(document).on('click.fndtn touchstart.fndtn', '.nav-bar a.flyout-toggle', function (e) {
        e.preventDefault();
        var flyout = $(this).siblings('.flyout').first();
        if (lockNavBar === false) {
          $('.nav-bar .flyout').not(flyout).slideUp(500);
          flyout.slideToggle(500, function () {
            lockNavBar = false;
          });
        }
        lockNavBar = true;
      });
      $('.nav-bar>li.has-flyout', this).addClass('is-touch');
    } else {
      $('.nav-bar>li.has-flyout', this).hover(function () {
        $(this).children('.flyout').show();
      }, function () {
        $(this).children('.flyout').hide();
      });
    }

  };

})( jQuery );

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
zurb-foundation-3.0.9 vendor/assets/javascripts/foundation/jquery.foundation.navigation.js
zurb-foundation-3.0.9.rc1 vendor/assets/javascripts/foundation/jquery.foundation.navigation.js
zurb-foundation-3.0.8 vendor/assets/javascripts/foundation/jquery.foundation.navigation.js