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.11 to 1.2.12

26

dist/js/bootstrap-submenu.js
/*!
* Bootstrap-submenu v1.2.11 (http://vsn4ik.github.io/bootstrap-submenu)
* Bootstrap-submenu v1.2.12 (http://vsn4ik.github.io/bootstrap-submenu)
* Copyright 2015 Vasily A. (https://github.com/vsn4ik)

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

})(function($) {
// Or ':not(.disabled):has(a)';
var desc = ':not(.disabled, .divider, .dropdown-header)';

@@ -43,9 +44,12 @@

init: function() {
this.$element.on('click.bs.dropdown', this.click.bind(this));
this.$element.keydown(this.keydown.bind(this));
this.$element.on({
'click.bs.dropdown': this.click.bind(this),
keydown: this.keydown.bind(this)
});
this.$menu.on('hide.bs.submenu', this.hide.bind(this));
this.$items.keydown(this.item_keydown.bind(this));
this.$items.on('keydown', this.item_keydown.bind(this));
// Bootstrap fix
this.$menu.nextAll(desc + ':first:not(.dropdown-submenu)').children('a').keydown(this.next_keydown.bind(this));
this.$menu.nextAll(desc + ':first:not(.dropdown-submenu)').children('a').on('keydown', this.next_keydown.bind(this));
},

@@ -97,3 +101,3 @@ click: function(event) {

this.$menus.trigger('hide.bs.submenu');
this.$drop.removeClass('open').children('a').focus();
this.$drop.removeClass('open').children('a').trigger('focus');
}

@@ -116,3 +120,3 @@ }

$items.eq(index).focus();
$items.eq(index).trigger('focus');
}

@@ -131,3 +135,3 @@ }

this.close();
this.$element.focus();
this.$element.trigger('focus');
},

@@ -151,3 +155,3 @@ next_keydown: function(event) {

$items.eq(index - 1).focus();
$items.eq(index - 1).trigger('focus');
}

@@ -158,3 +162,3 @@ };

// http://learn.jquery.com/jquery-ui/environments/amd/
return ($.fn.submenupicker = function(elements) {
return $.fn.submenupicker = function(elements) {
var $elements = this instanceof $ ? this : $(elements);

@@ -171,3 +175,3 @@

});
});
};
});
/*!
* Bootstrap-submenu v1.2.11 (http://vsn4ik.github.io/bootstrap-submenu)
* Bootstrap-submenu v1.2.12 (http://vsn4ik.github.io/bootstrap-submenu)
* Copyright 2015 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):"object"==typeof exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){function b(b){this.$element=a(b),this.$main=this.$element.closest(".dropdown, .dropup, .btn-group"),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.$main.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))})}});
"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.$main=this.$element.closest(".dropdown, .dropup, .btn-group"),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),keydown:this.keydown.bind(this)}),this.$menu.on("hide.bs.submenu",this.hide.bind(this)),this.$items.on("keydown",this.item_keydown.bind(this)),this.$menu.nextAll(c+":first:not(.dropdown-submenu)").children("a").on("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").trigger("focus"));else{var b=this.$main.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).trigger("focus")}},item_keydown:function(a){27==a.keyCode&&(a.stopPropagation(),this.close(),this.$element.trigger("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).trigger("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))})}});

@@ -17,2 +17,3 @@ 'use strict';

})(function($) {
// Or ':not(.disabled):has(a)';
var desc = ':not(.disabled, .divider, .dropdown-header)';

@@ -37,9 +38,12 @@

init: function() {
this.$element.on('click.bs.dropdown', this.click.bind(this));
this.$element.keydown(this.keydown.bind(this));
this.$element.on({
'click.bs.dropdown': this.click.bind(this),
keydown: this.keydown.bind(this)
});
this.$menu.on('hide.bs.submenu', this.hide.bind(this));
this.$items.keydown(this.item_keydown.bind(this));
this.$items.on('keydown', this.item_keydown.bind(this));
// Bootstrap fix
this.$menu.nextAll(desc + ':first:not(.dropdown-submenu)').children('a').keydown(this.next_keydown.bind(this));
this.$menu.nextAll(desc + ':first:not(.dropdown-submenu)').children('a').on('keydown', this.next_keydown.bind(this));
},

@@ -91,3 +95,3 @@ click: function(event) {

this.$menus.trigger('hide.bs.submenu');
this.$drop.removeClass('open').children('a').focus();
this.$drop.removeClass('open').children('a').trigger('focus');
}

@@ -110,3 +114,3 @@ }

$items.eq(index).focus();
$items.eq(index).trigger('focus');
}

@@ -125,3 +129,3 @@ }

this.close();
this.$element.focus();
this.$element.trigger('focus');
},

@@ -145,3 +149,3 @@ next_keydown: function(event) {

$items.eq(index - 1).focus();
$items.eq(index - 1).trigger('focus');
}

@@ -152,3 +156,3 @@ };

// http://learn.jquery.com/jquery-ui/environments/amd/
return ($.fn.submenupicker = function(elements) {
return $.fn.submenupicker = function(elements) {
var $elements = this instanceof $ ? this : $(elements);

@@ -165,3 +169,3 @@

});
});
};
});
{
"name": "bootstrap-submenu",
"version": "1.2.11",
"version": "1.2.12",
"description": "Bootstrap Sub-Menus",

@@ -32,20 +32,20 @@ "keywords": [

"devDependencies": {
"bootstrap": "~3.3.2",
"bootstrap": "~3.3.4",
"grunt": "~0.4.5",
"grunt-banner": "~0.3.1",
"grunt-banner": "~0.4.0",
"grunt-contrib-clean": "~0.6.0",
"grunt-contrib-compress": "~0.13.0",
"grunt-contrib-copy": "~0.7.0",
"grunt-contrib-cssmin": "~0.11.0",
"grunt-contrib-htmlmin": "~0.3.0",
"grunt-contrib-jshint": "~0.11.0",
"grunt-contrib-less": "~1.0.0",
"grunt-contrib-copy": "~0.8.0",
"grunt-contrib-cssmin": "~0.12.3",
"grunt-contrib-jshint": "~0.11.2",
"grunt-contrib-less": "~1.0.1",
"grunt-contrib-symlink": "~0.3.0",
"grunt-contrib-uglify": "~0.7.0",
"grunt-contrib-uglify": "~0.9.1",
"grunt-jekyll": "~0.4.2",
"load-grunt-tasks": "~3.0.0",
"jquery": "~2.1.4",
"load-grunt-tasks": "~3.1.0",
"octicons": "github/octicons"
},
"engines": {
"node": "~0.10.1"
"node": "=>0.10.0"
},

@@ -52,0 +52,0 @@ "spm": {

# [Bootstrap-submenu](http://vsn4ik.github.io/bootstrap-submenu)
[![Bower version](https://img.shields.io/bower/v/bootstrap-submenu.svg?style=flat)](https://github.com/vsn4ik/bootstrap-submenu)
[![npm version](https://img.shields.io/npm/v/bootstrap-submenu.svg?style=flat)](https://www.npmjs.com/package/bootstrap-submenu)
[![License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)][license]
[![Bower version](https://img.shields.io/bower/v/bootstrap-submenu.svg)](https://github.com/vsn4ik/bootstrap-submenu)
[![npm version](https://img.shields.io/npm/v/bootstrap-submenu.svg)](https://www.npmjs.com/package/bootstrap-submenu)
[![License](https://img.shields.io/badge/license-MIT-brightgreen.svg)][license]
[![Build Status](https://travis-ci.org/vsn4ik/bootstrap-submenu.svg)](https://travis-ci.org/vsn4ik/bootstrap-submenu)

@@ -12,5 +12,5 @@ [![devDependency Status](https://david-dm.org/vsn4ik/bootstrap-submenu/dev-status.svg)](https://david-dm.org/vsn4ik/bootstrap-submenu#info=devDependencies)

Six quick start options are available:
Several quick start options are available:
- [Download the latest release](https://github.com/vsn4ik/bootstrap-submenu/releases/download/v1.2.11/bootstrap-submenu-1.2.11-dist.zip "Download Bootstrap-submenu").
- [Download the latest release](https://github.com/vsn4ik/bootstrap-submenu/releases/download/v1.2.12/bootstrap-submenu-1.2.12-dist.zip "Download Bootstrap-submenu").
- Clone the repo: `git clone https://github.com/vsn4ik/bootstrap-submenu.git`.

@@ -56,3 +56,3 @@ - Install with [Bower](http://bower.io): `bower install bootstrap-submenu`.

Copyright Vasily A., 2015.
Copyright Vasily A., 2014–2015.

@@ -59,0 +59,0 @@ Licensed under [the MIT License][license].

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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