New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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.3 to 1.2.4

24

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

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

if (typeof define == 'function' && define.amd) {
// AMD. Register as an anonymous module depending on jQuery
// AMD. Register as an anonymous module
define(['jquery'], factory);
}
else if (typeof exports == 'object') {
// Node/CommonJS
module.exports = factory(require('jquery'));
}
else {
// No AMD. Register plugin with global jQuery object
// Browser globals
factory(jQuery);

@@ -147,13 +151,19 @@ }

$.fn.submenupicker = function() {
return this.each(function() {
// For AMD/Node/CommonJS used elements (optional)
// http://learn.jquery.com/jquery-ui/environments/amd/
$.fn.submenupicker = function(elements) {
var $elements = this instanceof $ ? this : $(elements);
return $elements.each(function() {
var data = $.data(this, 'bs.submenu');
if (!data) {
new Submenupicker(this);
data = new Submenupicker(this);
$.data(this, 'bs.submenu', true);
$.data(this, 'bs.submenu', data);
}
});
};
return $.fn.submenupicker;
});
/*!
* Bootstrap-submenu v1.2.3 (http://vsn4ik.github.io/bootstrap-submenu)
* Bootstrap-submenu v1.2.4 (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";!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";!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a(require("jquery")):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)";return 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(c){var d=this instanceof a?this:a(c);return d.each(function(){var c=a.data(this,"bs.submenu");c||(c=new b(this),a.data(this,"bs.submenu",c))})},a.fn.submenupicker});

@@ -5,7 +5,11 @@ 'use strict';

if (typeof define == 'function' && define.amd) {
// AMD. Register as an anonymous module depending on jQuery
// AMD. Register as an anonymous module
define(['jquery'], factory);
}
else if (typeof exports == 'object') {
// Node/CommonJS
module.exports = factory(require('jquery'));
}
else {
// No AMD. Register plugin with global jQuery object
// Browser globals
factory(jQuery);

@@ -141,13 +145,19 @@ }

$.fn.submenupicker = function() {
return this.each(function() {
// For AMD/Node/CommonJS used elements (optional)
// http://learn.jquery.com/jquery-ui/environments/amd/
$.fn.submenupicker = function(elements) {
var $elements = this instanceof $ ? this : $(elements);
return $elements.each(function() {
var data = $.data(this, 'bs.submenu');
if (!data) {
new Submenupicker(this);
data = new Submenupicker(this);
$.data(this, 'bs.submenu', true);
$.data(this, 'bs.submenu', data);
}
});
};
return $.fn.submenupicker;
});
{
"name": "bootstrap-submenu",
"version": "1.2.3",
"version": "1.2.4",
"description": "Bootstrap Sub-Menus",

@@ -5,0 +5,0 @@ "keywords": [

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