/** * Created by asus80 on 2016/1/26. */ //Dropdowns, Tooltips, Carousel +function (a) { "use strict"; var b = function (b, c) { this.$element = a(b), this.$indicators = this.$element.find(".carousel-indicators"), this.options = c, this.paused = this.sliding = this.interval = this.$active = this.$items = null, this.options.pause == "hover" && this.$element.on("mouseenter", a.proxy(this.pause, this)).on("mouseleave", a.proxy(this.cycle, this)) }; b.DEFAULTS = {interval: 5e3, pause: "hover", wrap: !0}, b.prototype.cycle = function (b) { return b || (this.paused = !1), this.interval && clearInterval(this.interval), this.options.interval && !this.paused && (this.interval = setInterval(a.proxy(this.next, this), this.options.interval)), this }, b.prototype.getActiveIndex = function () { return this.$active = this.$element.find(".item.active"), this.$items = this.$active.parent().children(), this.$items.index(this.$active) }, b.prototype.to = function (b) { var c = this, d = this.getActiveIndex(); if (b > this.$items.length - 1 || b < 0)return; return this.sliding ? this.$element.one("slid.bs.carousel", function () { c.to(b) }) : d == b ? this.pause().cycle() : this.slide(b > d ? "next" : "prev", a(this.$items[b])) }, b.prototype.pause = function (b) { return b || (this.paused = !0), this.$element.find(".next, .prev").length && a.support.transition.end && (this.$element.trigger(a.support.transition.end), this.cycle(!0)), this.interval = clearInterval(this.interval), this }, b.prototype.next = function () { if (this.sliding)return; return this.slide("next") }, b.prototype.prev = function () { if (this.sliding)return; return this.slide("prev") }, b.prototype.slide = function (b, c) { var d = this.$element.find(".item.active"), e = c || d[b](), f = this.interval, g = b == "next" ? "left" : "right", h = b == "next" ? "first" : "last", i = this; if (!e.length) { if (!this.options.wrap)return; e = this.$element.find(".item")[h]() } this.sliding = !0, f && this.pause(); var j = a.Event("slide.bs.carousel", {relatedTarget: e[0], direction: g}); if (e.hasClass("active"))return; this.$indicators.length && (this.$indicators.find(".active").removeClass("active"), this.$element.one("slid.bs.carousel", function () { var b = a(i.$indicators.children()[i.getActiveIndex()]); b && b.addClass("active") })); if (a.support.transition && this.$element.hasClass("slide")) { this.$element.trigger(j); if (j.isDefaultPrevented())return; e.addClass(b), e[0].offsetWidth, d.addClass(g), e.addClass(g), d.one(a.support.transition.end, function () { e.removeClass([b, g].join(" ")).addClass("active"), d.removeClass(["active", g].join(" ")), i.sliding = !1, setTimeout(function () { i.$element.trigger("slid.bs.carousel") }, 0) }).emulateTransitionEnd(600) } else { this.$element.trigger(j); if (j.isDefaultPrevented())return; d.removeClass("active"), e.addClass("active"), this.sliding = !1, this.$element.trigger("slid.bs.carousel") } return f && this.cycle(), this }; var c = a.fn.carousel; a.fn.carousel = function (c) { return this.each(function () { var d = a(this), e = d.data("bs.carousel"), f = a.extend({}, b.DEFAULTS, d.data(), typeof c == "object" && c), g = typeof c == "string" ? c : f.slide; e || d.data("bs.carousel", e = new b(this, f)), typeof c == "number" ? e.to(c) : g ? e[g]() : f.interval && e.pause().cycle() }) }, a.fn.carousel.Constructor = b, a.fn.carousel.noConflict = function () { return a.fn.carousel = c, this }, a(document).on("click.bs.carousel.data-api", "[data-slide], [data-slide-to]", function (b) { var c = a(this), d, e = a(c.attr("data-target") || (d = c.attr("href")) && d.replace(/.*(?=#[^\s]+$)/, "")), f = a.extend({}, e.data(), c.data()), g = c.attr("data-slide-to"); g && (f.interval = !1), e.carousel(f), (g = c.attr("data-slide-to")) && e.data("bs.carousel").to(g), b.preventDefault() }), a(window).on("load", function () { a('[data-ride="carousel"]').each(function () { var b = a(this); b.carousel(b.data()) }) }) }(jQuery), +function (a) { function e() { a(b).remove(), a(c).each(function (b) { var c = f(a(this)); if (!c.hasClass("open"))return; c.trigger(b = a.Event("hide.bs.dropdown")); if (b.isDefaultPrevented())return; c.removeClass("open").trigger("hidden.bs.dropdown") }) } function f(b) { var c = b.attr("data-target"); c || (c = b.attr("href"), c = c && /#/.test(c) && c.replace(/.*(?=#[^\s]*$)/, "")); var d = c && a(c); return d && d.length ? d : b.parent() } "use strict"; var b = ".dropdown-backdrop", c = "[data-toggle=dropdown]", d = function (b) { a(b).on("click.bs.dropdown", this.toggle) }; d.prototype.toggle = function (b) { var c = a(this); if (c.is(".disabled, :disabled"))return; var d = f(c), g = d.hasClass("open"); e(); if (!g) { "ontouchstart"in document.documentElement && !d.closest(".navbar-nav").length && a('