bootstrap-submenu
Advanced tools
Comparing version 1.0.6 to 1.0.7
/*! | ||
* Bootstrap-submenu v1.0.6 (http://vsn4ik.github.io/bootstrap-submenu) | ||
* Bootstrap-submenu v1.0.7 (http://vsn4ik.github.io/bootstrap-submenu) | ||
* Copyright 2014 vsn4ik | ||
@@ -14,3 +14,3 @@ * Licensed under MIT (https://github.com/vsn4ik/bootstrap-submenu/blob/master/LICENSE) | ||
(function($) { | ||
function Submenupicker(element, options) { | ||
function Submenupicker(element) { | ||
this.$element = $(element); | ||
@@ -27,3 +27,3 @@ this.$menu = this.$element.parent(); | ||
}, | ||
toggle: function(event) { | ||
toggle: function() { | ||
event.stopPropagation(); | ||
@@ -41,11 +41,11 @@ | ||
$.fn.submenupicker = function(options) { | ||
$.fn.submenupicker = function() { | ||
return this.each(function() { | ||
var $this = $(this); | ||
var data = $this.data('submenupicker'); | ||
var data = $this.data('bs.submenu'); | ||
if (!data) { | ||
new Submenupicker(this, options); | ||
new Submenupicker(this); | ||
$this.data('submenupicker', true); | ||
$this.data('bs.submenu', true); | ||
} | ||
@@ -52,0 +52,0 @@ }); |
/*! | ||
* Bootstrap-submenu v1.0.6 (http://vsn4ik.github.io/bootstrap-submenu) | ||
* Bootstrap-submenu v1.0.7 (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))},toggle:function(a){a.stopPropagation();var b=this.$menu.hasClass("open");this.$submenus.removeClass("open"),b||this.$menu.addClass("open")}},a.fn.submenupicker=function(c){return this.each(function(){var d=a(this),e=d.data("submenupicker");e||(new b(this,c),d.data("submenupicker",!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))},toggle:function(){event.stopPropagation();var a=this.$menu.hasClass("open");this.$submenus.removeClass("open"),a||this.$menu.addClass("open")}},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); |
@@ -8,3 +8,3 @@ 'use strict'; | ||
(function($) { | ||
function Submenupicker(element, options) { | ||
function Submenupicker(element) { | ||
this.$element = $(element); | ||
@@ -21,3 +21,3 @@ this.$menu = this.$element.parent(); | ||
}, | ||
toggle: function(event) { | ||
toggle: function() { | ||
event.stopPropagation(); | ||
@@ -35,11 +35,11 @@ | ||
$.fn.submenupicker = function(options) { | ||
$.fn.submenupicker = function() { | ||
return this.each(function() { | ||
var $this = $(this); | ||
var data = $this.data('submenupicker'); | ||
var data = $this.data('bs.submenu'); | ||
if (!data) { | ||
new Submenupicker(this, options); | ||
new Submenupicker(this); | ||
$this.data('submenupicker', true); | ||
$this.data('bs.submenu', true); | ||
} | ||
@@ -46,0 +46,0 @@ }); |
{ | ||
"name": "bootstrap-submenu", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "Bootstrap Sub-Menus", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -6,2 +6,3 @@ # [Bootstrap-submenu](http://vsn4ik.github.io/bootstrap-submenu) | ||
[![Build Status](https://travis-ci.org/vsn4ik/bootstrap-submenu.svg)](https://travis-ci.org/vsn4ik/bootstrap-submenu) | ||
[![License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](LICENSE) | ||
[![devDependency Status](https://david-dm.org/vsn4ik/bootstrap-submenu/dev-status.svg)](https://david-dm.org/vsn4ik/bootstrap-submenu#info=devDependencies) | ||
@@ -8,0 +9,0 @@ |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
39
10129
131