PageSourceSearch

https://immunitet.org/catalog/view/javascript/bootstrap-hover-dropdown.min.js

js immunitet.org collected 2026-10-04 00:14:27 UTC 2,293 bytes, 61 lines download raw bytes

1/**
2 * @preserve
3 * Project: Bootstrap Hover Dropdown
4 * Author: Cameron Spear
5 * Version: v2.0.11
6 * Contributors: Mattia Larentis
7 * Dependencies: Bootstrap's Dropdown plugin, jQuery
8 * Description: A simple plugin to enable Bootstrap dropdowns to active on hover and provide a nice user experience.
9 * License: MIT
10 * Homepage: http://cameronspear.com/blog/bootstrap-dropdown-on-hover-plugin/
11 */
12!function($, n, e) {
13    var o = $();
14    $.fn.dropdownHover = function(e) {
15        return "ontouchstart" in document ? this : (o = o.add(this.parent()),
16        this.each(function() {
17            function t(e) {
18                o.find(":focus").blur(),
19                h.instantlyCloseOthers === !0 && o.removeClass("open"),
20                n.clearTimeout(c),
21                i.addClass("open"),
22                r.trigger(a)
23            }
24            var r = $(this), i = r.parent(), d = {
25                delay: 500,
26                instantlyCloseOthers: !0
27            }, s = {
28                delay: $(this).data("delay"),
29                instantlyCloseOthers: $(this).data("close-others")
30            }, a = "show.bs.dropdown", u = "hide.bs.dropdown", h = $.extend(!0, {}, d, e, s), c;
31            i.hover(function(n) {
32                return i.hasClass("open") || r.is(n.target) ? void t(n) : !0
33            }, function() {
34                c = n.setTimeout(function() {
35                    i.removeClass("open"),
36                    r.trigger(u)
37                }, h.delay)
38            }),
39            r.hover(function(n) {
40                return i.hasClass("open") || i.is(n.target) ? void t(n) : !0
41            }),
42            i.find(".dropdown-submenu").each(function() {
43                var e = $(this), o;
44                e.hover(function() {
45                    n.clearTimeout(o),
46                    e.children(".dropdown-menu").show(),
47                    e.siblings().children(".dropdown-menu").hide()
48                }, function() {
49                    var t = e.children(".dropdown-menu");
50                    o = n.setTimeout(function() {
51                        t.hide()
52                    }, h.delay)
53                })
54            })
55        }))
56    }
57    ,
58    $(document).ready(function() {
59        $('[data-hover="dropdown"]').dropdownHover()
60    })
61}(jQuery, 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.