PageSourceSearch

https://www.razavirealty.com/themes/bannertheme/js/jquery.flexnav.js?1

js razavirealty.com collected 2026-10-09 22:13:07 UTC 5,737 bytes, 145 lines download raw bytes

1/*
2	FlexNav.js 1.3.3
3
4	Created by Jason Weaver http://jasonweaver.name
5	Released under http://unlicense.org/
6
7//
8*/
9
10
11(function() {
12  var $;
13
14  $ = jQuery;
15
16  $.fn.flexNav = function(options) {
17    var $nav, $top_nav_items, breakpoint, count, nav_percent, nav_width, resetMenu, resizer, settings, showMenu, toggle_selector, touch_selector, touch_selector2;
18    settings = $.extend({
19      'animationSpeed': 250,
20      'transitionOpacity': true,
21      'buttonSelector': '.menu-button',
22      'hoverIntent': false,
23      'hoverIntentTimeout': 150,
24      'calcItemWidths': false,
25      'hover': true
26    }, options);
27    $nav = $(this);
28    $nav.addClass('with-js');
29    if (settings.transitionOpacity === true) {
30      $nav.addClass('opacity');
31    }
32    $nav.find("li").each(function() {
33      if ($(this).has("ul").length) {
34        return $(this).addClass("item-with-ul").find("ul").hide();
35      }
36    });
37    if (settings.calcItemWidths === true) {
38      $top_nav_items = $nav.find('>li');
39      count = $top_nav_items.length;
40      nav_width = 100 / count;
41      nav_percent = nav_width + "%";
42    }
43    if ($nav.data('breakpoint')) {
44      breakpoint = $nav.data('breakpoint');
45    }
46    showMenu = function() {
47      if ($nav.hasClass('lg-screen') === true && settings.hover === true) {
48        if (settings.transitionOpacity === true) {
49          return $(this).find('>ul').addClass('flexnav-show').stop(true, true).animate({
50            height: ["toggle", "swing"],
51            opacity: "toggle"
52          }, settings.animationSpeed);
53        } else {
54          return $(this).find('>ul').addClass('flexnav-show').stop(true, true).animate({
55            height: ["toggle", "swing"]
56          }, settings.animationSpeed);
57        }
58      }
59    };
60    resetMenu = function() {
61      if ($nav.hasClass('lg-screen') === true && $(this).find('>ul').hasClass('flexnav-show') === true && settings.hover === true) {
62        if (settings.transitionOpacity === true) {
63          return $(this).find('>ul').removeClass('flexnav-show').stop(true, true).animate({
64            height: ["toggle", "swing"],
65            opacity: "toggle"
66          }, settings.animationSpeed);
67        } else {
68          return $(this).find('>ul').removeClass('flexnav-show').stop(true, true).animate({
69            height: ["toggle", "swing"]
70          }, settings.animationSpeed);
71        }
72      }
73    };
74    resizer = function() {
75      var selector;
76     if ($('body').hasClass('mobileVersion')) {
77        $nav.removeClass("lg-screen").addClass("sm-screen");
78        if (settings.calcItemWidths === true) {
79          $top_nav_items.css('width', '100%');
80        }
81        selector = settings['buttonSelector'] + ', ' + settings['buttonSelector'] + ' .touch-button';
82        $(selector).removeClass('active');
83        return $('.one-page li a').on('click', function() {
84          return $nav.removeClass('flexnav-show');
85        });
86      } else if (!$('body').hasClass('mobileVersion')) {
87        $nav.removeClass("sm-screen").addClass("lg-screen");
88        if (settings.calcItemWidths === true) {
89          $top_nav_items.css('width', nav_percent);
90        }
91        $nav.removeClass('flexnav-show').find('.item-with-ul').on();
92        $('.item-with-ul').find('ul').removeClass('flexnav-show');
93        resetMenu();
94        if (settings.hoverIntent === true) {
95          return $('.item-with-ul').hoverIntent({
96            over: showMenu,
97            out: resetMenu,
98            timeout: settings.hoverIntentTimeout
99          });
100        } else if (settings.hoverIntent === false) {
101            $('.item-with-ul').unbind('mouseenter').unbind('mouseleave');
102          return $('.item-with-ul').on('mouseenter', showMenu).on('mouseleave', resetMenu);
103        }
104      }
105    };
106    $(settings['buttonSelector']).data('navEl', $nav);
107    touch_selector = '.item-with-ul';
108    $(touch_selector).append('<span class="touch-button"><i class="navicon"></i></span>');
109    touch_selector2 = settings['buttonSelector'];
110    $(touch_selector2).append('<span class="touch-button"><i class="navicon"><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></i></span>');
111    toggle_selector = settings['buttonSelector'] + ', ' + settings['buttonSelector'] + ' .touch-button';
112    $(toggle_selector).on('click', function(e) {
113      var $btnParent, $thisNav, bs;
114      $(toggle_selector).toggleClass('active');
115      e.preventDefault();
116      e.stopPropagation();
117      bs = settings['buttonSelector'];
118      $btnParent = $(this).is(bs) ? $(this) : $(this).parent(bs);
119      $thisNav = $btnParent.data('navEl');
120      return $thisNav.toggleClass('flexnav-show');
121    });
122    $('.touch-button').on('click', function(e) {
123      var $sub, $touchButton;
124      $sub = $(this).parent('.item-with-ul').find('>ul');
125      $touchButton = $(this).parent('.item-with-ul');
126      if ($nav.hasClass('lg-screen') === true) {
127        $(this).parent('.item-with-ul').siblings().find('ul.flexnav-show').removeClass('flexnav-show').hide();
128      }
129      if ($sub.hasClass('flexnav-show') === true) {
130        $sub.removeClass('flexnav-show').slideUp(settings.animationSpeed);
131        return $touchButton.removeClass('activeLiClass');
132      } else if ($sub.hasClass('flexnav-show') === false) {
133        $sub.addClass('flexnav-show').slideDown(settings.animationSpeed);
134        return $touchButton.addClass('activeLiClass');
135      }
136    });
137    $nav.find('.item-with-ul *').focus(function() {
138      $(this).parent('.item-with-ul').parent().find(".open").not(this).removeClass("open").hide();
139      return $(this).parent('.item-with-ul').find('>ul').addClass("open").show();
140    });
141    resizer();
142    return $(window).on('resize', resizer);
143  };
144
145}).call(this);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.