bootstrap-submenu
Advanced tools
Comparing version 1.1.0 to 1.1.1
/*! | ||
* Bootstrap-submenu v1.1.0 (http://vsn4ik.github.io/bootstrap-submenu) | ||
* Bootstrap-submenu v1.1.1 (http://vsn4ik.github.io/bootstrap-submenu) | ||
* Copyright 2014 vsn4ik | ||
@@ -27,3 +27,3 @@ * Licensed under MIT (https://github.com/vsn4ik/bootstrap-submenu/blob/master/LICENSE) | ||
}, | ||
toggle: function() { | ||
toggle: function(event) { | ||
event.stopPropagation(); | ||
@@ -39,3 +39,3 @@ | ||
}, | ||
keydown: function() { | ||
keydown: function(event) { | ||
// 13: Return, 32: Spacebar | ||
@@ -42,0 +42,0 @@ |
/*! | ||
* Bootstrap-submenu v1.1.0 (http://vsn4ik.github.io/bootstrap-submenu) | ||
* Bootstrap-submenu v1.1.1 (http://vsn4ik.github.io/bootstrap-submenu) | ||
* Copyright 2014 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.$menu=this.$element.parent(),this.$submenus=this.$menu.parent().find(".dropdown-submenu"),this.init()}b.prototype={init:function(){this.$element.on("click.bs.dropdown",this.toggle.bind(this)),this.$menu.keydown(this.keydown.bind(this))},toggle:function(){event.stopPropagation();var a=this.$menu.hasClass("open");this.$submenus.removeClass("open"),a||this.$menu.addClass("open")},keydown:function(){32==event.keyCode&&event.preventDefault(),/^(13|32)$/.test(event.keyCode)&&this.toggle()}},a.fn.submenupicker=function(){return this.each(function(){var c=a(this),d=c.data("bs.submenu");d||(new b(this),c.data("bs.submenu",!0))})}}(jQuery); | ||
"use strict";if("undefined"==typeof jQuery)throw new Error("Bootstrap-submenu requires jQuery");!function(a){function b(b){this.$element=a(b),this.$menu=this.$element.parent(),this.$submenus=this.$menu.parent().find(".dropdown-submenu"),this.init()}b.prototype={init:function(){this.$element.on("click.bs.dropdown",this.toggle.bind(this)),this.$menu.keydown(this.keydown.bind(this))},toggle:function(a){a.stopPropagation();var b=this.$menu.hasClass("open");this.$submenus.removeClass("open"),b||this.$menu.addClass("open")},keydown:function(a){32==a.keyCode&&a.preventDefault(),/^(13|32)$/.test(a.keyCode)&&this.toggle()}},a.fn.submenupicker=function(){return this.each(function(){var c=a(this),d=c.data("bs.submenu");d||(new b(this),c.data("bs.submenu",!0))})}}(jQuery); |
@@ -21,3 +21,3 @@ 'use strict'; | ||
}, | ||
toggle: function() { | ||
toggle: function(event) { | ||
event.stopPropagation(); | ||
@@ -33,3 +33,3 @@ | ||
}, | ||
keydown: function() { | ||
keydown: function(event) { | ||
// 13: Return, 32: Spacebar | ||
@@ -36,0 +36,0 @@ |
{ | ||
"name": "bootstrap-submenu", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"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
10847