Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bootstrap-submenu

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bootstrap-submenu - npm Package Compare versions

Comparing version 1.2.2 to 1.2.3

21

dist/js/bootstrap-submenu.js
/*!
* Bootstrap-submenu v1.2.2 (http://vsn4ik.github.io/bootstrap-submenu)
* Bootstrap-submenu v1.2.3 (http://vsn4ik.github.io/bootstrap-submenu)
* Copyright 2014 Vasily A. (https://github.com/vsn4ik)

@@ -9,7 +9,12 @@ * Licensed under MIT (https://github.com/vsn4ik/bootstrap-submenu/blob/master/LICENSE)

if (typeof jQuery === 'undefined') {
throw new Error('Bootstrap-submenu requires jQuery');
}
(function($) {
(function(factory) {
if (typeof define == 'function' && define.amd) {
// AMD. Register as an anonymous module depending on jQuery
define(['jquery'], factory);
}
else {
// No AMD. Register plugin with global jQuery object
factory(jQuery);
}
})(function($) {
var desc = ':not(.disabled, .divider, .dropdown-header)';

@@ -93,3 +98,3 @@

var index = $items.index(this.$element);
var index = $items.index(event.target);

@@ -154,2 +159,2 @@ if (event.keyCode == 38 && index !== 0) {

};
})(jQuery);
});
/*!
* Bootstrap-submenu v1.2.2 (http://vsn4ik.github.io/bootstrap-submenu)
* Bootstrap-submenu v1.2.3 (http://vsn4ik.github.io/bootstrap-submenu)
* Copyright 2014 Vasily A. (https://github.com/vsn4ik)

@@ -7,2 +7,2 @@ * Licensed under MIT (https://github.com/vsn4ik/bootstrap-submenu/blob/master/LICENSE)

"use strict";if("undefined"==typeof jQuery)throw new Error("Bootstrap-submenu requires jQuery");!function(a){function b(b){this.$element=a(b),this.$dropdown=this.$element.closest(".dropdown"),this.$menu=this.$element.parent(),this.$drop=this.$menu.parent().parent(),this.$menus=this.$menu.siblings(".dropdown-submenu");var d=this.$menu.find("> .dropdown-menu > "+c);this.$submenus=d.filter(".dropdown-submenu"),this.$items=d.not(".dropdown-submenu"),this.init()}var c=":not(.disabled, .divider, .dropdown-header)";b.prototype={init:function(){this.$element.on("click.bs.dropdown",this.click.bind(this)),this.$element.keydown(this.keydown.bind(this)),this.$menu.on("hide.bs.submenu",this.hide.bind(this)),this.$items.keydown(this.item_keydown.bind(this)),this.$menu.nextAll(c+":first").not(".dropdown-submenu").children("a").keydown(this.next_keydown.bind(this))},click:function(a){a.stopPropagation(),this.toggle()},toggle:function(){this.$menu.hasClass("open")?this.close():(this.$menu.addClass("open"),this.$menus.trigger("hide.bs.submenu"))},hide:function(a){a.stopPropagation(),this.close()},close:function(){this.$menu.removeClass("open"),this.$submenus.trigger("hide.bs.submenu")},keydown:function(a){if(/^(32|38|40)$/.test(a.keyCode)&&a.preventDefault(),/^(13|32)$/.test(a.keyCode))this.toggle();else if(/^(27|38|40)$/.test(a.keyCode))if(a.stopPropagation(),27==a.keyCode)this.$menu.hasClass("open")?this.close():(this.$menus.trigger("hide.bs.submenu"),this.$drop.removeClass("open").children("a").focus());else{var b=this.$dropdown.find("li:not(.disabled):visible > a"),c=b.index(this.$element);if(38==a.keyCode&&0!==c)c--;else{if(40!=a.keyCode||c===b.length-1)return;c++}b.eq(c).focus()}},item_keydown:function(a){27==a.keyCode&&(a.stopPropagation(),this.close(),this.$element.focus())},next_keydown:function(a){if(38==a.keyCode){a.preventDefault(),a.stopPropagation();var b=this.$drop.find("li:not(.disabled):visible > a"),c=b.index(a.target);b.eq(c-1).focus()}}},a.fn.submenupicker=function(){return this.each(function(){var c=a.data(this,"bs.submenu");c||(new b(this),a.data(this,"bs.submenu",!0))})}}(jQuery);
"use strict";!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){function b(b){this.$element=a(b),this.$dropdown=this.$element.closest(".dropdown"),this.$menu=this.$element.parent(),this.$drop=this.$menu.parent().parent(),this.$menus=this.$menu.siblings(".dropdown-submenu");var d=this.$menu.find("> .dropdown-menu > "+c);this.$submenus=d.filter(".dropdown-submenu"),this.$items=d.not(".dropdown-submenu"),this.init()}var c=":not(.disabled, .divider, .dropdown-header)";b.prototype={init:function(){this.$element.on("click.bs.dropdown",this.click.bind(this)),this.$element.keydown(this.keydown.bind(this)),this.$menu.on("hide.bs.submenu",this.hide.bind(this)),this.$items.keydown(this.item_keydown.bind(this)),this.$menu.nextAll(c+":first").not(".dropdown-submenu").children("a").keydown(this.next_keydown.bind(this))},click:function(a){a.stopPropagation(),this.toggle()},toggle:function(){this.$menu.hasClass("open")?this.close():(this.$menu.addClass("open"),this.$menus.trigger("hide.bs.submenu"))},hide:function(a){a.stopPropagation(),this.close()},close:function(){this.$menu.removeClass("open"),this.$submenus.trigger("hide.bs.submenu")},keydown:function(a){if(/^(32|38|40)$/.test(a.keyCode)&&a.preventDefault(),/^(13|32)$/.test(a.keyCode))this.toggle();else if(/^(27|38|40)$/.test(a.keyCode))if(a.stopPropagation(),27==a.keyCode)this.$menu.hasClass("open")?this.close():(this.$menus.trigger("hide.bs.submenu"),this.$drop.removeClass("open").children("a").focus());else{var b=this.$dropdown.find("li:not(.disabled):visible > a"),c=b.index(a.target);if(38==a.keyCode&&0!==c)c--;else{if(40!=a.keyCode||c===b.length-1)return;c++}b.eq(c).focus()}},item_keydown:function(a){27==a.keyCode&&(a.stopPropagation(),this.close(),this.$element.focus())},next_keydown:function(a){if(38==a.keyCode){a.preventDefault(),a.stopPropagation();var b=this.$drop.find("li:not(.disabled):visible > a"),c=b.index(a.target);b.eq(c-1).focus()}}},a.fn.submenupicker=function(){return this.each(function(){var c=a.data(this,"bs.submenu");c||(new b(this),a.data(this,"bs.submenu",!0))})}});
'use strict';
if (typeof jQuery === 'undefined') {
throw new Error('Bootstrap-submenu requires jQuery');
}
(function($) {
(function(factory) {
if (typeof define == 'function' && define.amd) {
// AMD. Register as an anonymous module depending on jQuery
define(['jquery'], factory);
}
else {
// No AMD. Register plugin with global jQuery object
factory(jQuery);
}
})(function($) {
var desc = ':not(.disabled, .divider, .dropdown-header)';

@@ -86,3 +91,3 @@

var index = $items.index(this.$element);
var index = $items.index(event.target);

@@ -147,2 +152,2 @@ if (event.keyCode == 38 && index !== 0) {

};
})(jQuery);
});
{
"name": "bootstrap-submenu",
"version": "1.2.2",
"version": "1.2.3",
"description": "Bootstrap Sub-Menus",

@@ -39,3 +39,2 @@ "keywords": [

"grunt-banner": "~0.2.3",
"grunt-cli": "~0.1.13",
"grunt-contrib-clean": "~0.6.0",

@@ -42,0 +41,0 @@ "grunt-contrib-compress": "~0.12.0",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc