%PDF- %PDF-
Direktori : /home/alliance/domains/congress-pact1in5.eu/public_html/js/ |
Current File : /home/alliance/domains/congress-pact1in5.eu/public_html/js/jquery.slicknav.min.js |
/*! SlickNav Responsive Mobile Menu (c) 2014 Josh Cope licensed under MIT */ ; (function (e, t, n) { function o(t, n) { this.element = t; this.settings = e.extend({}, r, n); this._defaults = r; this._name = i; this.init() } var r = { label: "MENU", duplicate: true, duration: 200, easingOpen: "swing", easingClose: "swing", closedSymbol: "►", openedSymbol: "▼", prependTo: "body", parentTag: "div", closeOnClick: false, allowParentLinks: false, init: function () {}, open: function () {}, close: function () {} }, i = "slicknav", s = "slicknav"; o.prototype.init = function () { var n = this; var r = e(this.element); var i = this.settings; if (i.duplicate) { n.mobileNav = r.clone(); n.mobileNav.removeAttr("id"); n.mobileNav.find("*").each(function (t, n) { e(n).removeAttr("id") }) } else n.mobileNav = r; var o = s + "_icon"; if (i.label == "") { o += " " + s + "_no-text" } if (i.parentTag == "a") { i.parentTag = 'a href="#"' } n.mobileNav.attr("class", s + "_nav"); var u = e('<div class="' + s + '_menu"></div>'); n.btn = e("<" + i.parentTag + ' aria-haspopup="true" tabindex="0" class="' + s + "_btn " + s + '_collapsed"><span class="' + s + '_menutxt">' + i.label + '</span><span class="' + o + '"><span class="' + s + '_icon-bar"></span><span class="' + s + '_icon-bar"></span><span class="' + s + '_icon-bar"></span></span></a>'); e(u).append(n.btn); e(i.prependTo).prepend(u); u.append(n.mobileNav); var a = n.mobileNav.find("li"); e(a).each(function () { var t = e(this); data = {}; data.children = t.children("ul").attr("role", "menu"); t.data("menu", data); if (data.children.length > 0) { var r = t.contents(); var o = []; e(r).each(function () { if (!e(this).is("ul")) { o.push(this) } else { return false } }); var u = e(o).wrapAll("<" + i.parentTag + ' role="menuitem" aria-haspopup="true" tabindex="-1" class="' + s + '_item"/>').parent(); t.addClass(s + "_collapsed"); t.addClass(s + "_parent"); e(o).last().after('<span class="' + s + '_arrow">' + i.closedSymbol + "</span>") } else if (t.children().length == 0) { t.addClass(s + "_txtnode") } t.children("a").attr("role", "menuitem").click(function (t) { if (i.closeOnClick && !e(t.target).parent().closest("li").hasClass(s + "_parent")) e(n.btn).click() }); if (i.closeOnClick && i.allowParentLinks) { t.children("a").children("a").click(function (t) { e(n.btn).click() }) } }); e(a).each(function () { var t = e(this).data("menu"); n._visibilityToggle(t.children, false, null, true) }); n._visibilityToggle(n.mobileNav, false, "init", true); n.mobileNav.attr("role", "menu"); e(t).mousedown(function () { n._outlines(false) }); e(t).keyup(function () { n._outlines(true) }); e(n.btn).click(function (e) { e.preventDefault(); n._menuToggle() }); n.mobileNav.on("click", "." + s + "_item", function (t) { t.preventDefault(); n._itemClick(e(this)) }); e(n.btn).keydown(function (e) { var t = e || event; if (t.keyCode == 13) { e.preventDefault(); n._menuToggle() } }); n.mobileNav.on("keydown", "." + s + "_item", function (t) { var r = t || event; if (r.keyCode == 13) { t.preventDefault(); n._itemClick(e(t.target)) } }); if (i.allowParentLinks) { e("." + s + "_item a").click(function (e) { e.stopImmediatePropagation() }) } }; o.prototype._menuToggle = function (e) { var t = this; var n = t.btn; var r = t.mobileNav; if (n.hasClass(s + "_collapsed")) { n.removeClass(s + "_collapsed"); n.addClass(s + "_open") } else { n.removeClass(s + "_open"); n.addClass(s + "_collapsed") } n.addClass(s + "_animating"); t._visibilityToggle(r, true, n) }; o.prototype._itemClick = function (e) { var t = this; var n = t.settings; var r = e.data("menu"); if (!r) { r = {}; r.arrow = e.children("." + s + "_arrow"); r.ul = e.next("ul"); r.parent = e.parent(); e.data("menu", r) } if (r.parent.hasClass(s + "_collapsed")) { r.arrow.html(n.openedSymbol); r.parent.removeClass(s + "_collapsed"); r.parent.addClass(s + "_open"); r.parent.addClass(s + "_animating"); t._visibilityToggle(r.ul, true, e) } else { r.arrow.html(n.closedSymbol); r.parent.addClass(s + "_collapsed"); r.parent.removeClass(s + "_open"); r.parent.addClass(s + "_animating"); t._visibilityToggle(r.ul, true, e) } }; o.prototype._visibilityToggle = function (t, n, r, i) { var o = this; var u = o.settings; var a = o._getActionItems(t); var f = 0; if (n) f = u.duration; if (t.hasClass(s + "_hidden")) { t.removeClass(s + "_hidden"); t.slideDown(f, u.easingOpen, function () { e(r).removeClass(s + "_animating"); e(r).parent().removeClass(s + "_animating"); if (!i) { u.open(r) } }); t.attr("aria-hidden", "false"); a.attr("tabindex", "0"); o._setVisAttr(t, false) } else { t.addClass(s + "_hidden"); t.slideUp(f, this.settings.easingClose, function () { t.attr("aria-hidden", "true"); a.attr("tabindex", "-1"); o._setVisAttr(t, true); t.hide(); e(r).removeClass(s + "_animating"); e(r).parent().removeClass(s + "_animating"); if (!i) u.close(r); else if (r == "init") u.init() }) } }; o.prototype._setVisAttr = function (t, n) { var r = this; var i = t.children("li").children("ul").not("." + s + "_hidden"); if (!n) { i.each(function () { var t = e(this); t.attr("aria-hidden", "false"); var i = r._getActionItems(t); i.attr("tabindex", "0"); r._setVisAttr(t, n) }) } else { i.each(function () { var t = e(this); t.attr("aria-hidden", "true"); var i = r._getActionItems(t); i.attr("tabindex", "-1"); r._setVisAttr(t, n) }) } }; o.prototype._getActionItems = function (e) { var t = e.data("menu"); if (!t) { t = {}; var n = e.children("li"); var r = n.children("a"); t.links = r.add(n.children("." + s + "_item")); e.data("menu", t) } return t.links }; o.prototype._outlines = function (t) { if (!t) { e("." + s + "_item, ." + s + "_btn").css("outline", "none") } else { e("." + s + "_item, ." + s + "_btn").css("outline", "") } }; o.prototype.toggle = function () { $this._menuToggle() }; o.prototype.open = function () { $this = this; if ($this.btn.hasClass(s + "_collapsed")) { $this._menuToggle() } }; o.prototype.close = function () { $this = this; if ($this.btn.hasClass(s + "_open")) { $this._menuToggle() } }; e.fn[i] = function (t) { var n = arguments; if (t === undefined || typeof t === "object") { return this.each(function () { if (!e.data(this, "plugin_" + i)) { e.data(this, "plugin_" + i, new o(this, t)) } }) } else if (typeof t === "string" && t[0] !== "_" && t !== "init") { var r; this.each(function () { var s = e.data(this, "plugin_" + i); if (s instanceof o && typeof s[t] === "function") { r = s[t].apply(s, Array.prototype.slice.call(n, 1)) } }); return r !== undefined ? r : this } } })(jQuery, document, window)