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

dotsunited-off-canvas-navigation

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dotsunited-off-canvas-navigation - npm Package Compare versions

Comparing version 2.0.1 to 2.1.0

48

lib/setup.js

@@ -1,23 +0,33 @@

var $ = require('jquery');
(function(window, factory) {
if (typeof define === 'function' && define.amd) {
define(['jquery'], function($) {
return factory(window, $);
});
} else if (typeof module === 'object' && typeof module.exports === 'object') {
module.exports = factory(window, require('jquery'));
} else {
window.dotsunitedOffCanvasNavigation = factory(window, window.jQuery || window.Zepto);
}
}(typeof window !== 'undefined' ? window : this, function(window, $) {
return function(namespace) {
var toggleSelector = '[data-' + namespace + '-toggle]';
var openClass = namespace + '--open';
module.exports = function(namespace) {
var toggleSelector = '[data-' + namespace + '-toggle]';
var openClass = namespace + '--open';
var root = $('html').addClass(namespace);
var root = $('html').addClass(namespace);
$(window.document)
.on('click.' + namespace, toggleSelector, function(e) {
e.preventDefault();
$(document)
.on('click.' + namespace, toggleSelector, function(e) {
e.preventDefault();
var expanded = root
.toggleClass(openClass)
.hasClass(openClass)
;
var expanded = root
.toggleClass(openClass)
.hasClass(openClass)
;
$(toggleSelector)
.attr('aria-expanded', (expanded ? 'true' : 'false'))
.trigger(namespace + ':' + (expanded ? 'open' : 'close'), [this]);
})
;
};
$(toggleSelector)
.attr('aria-expanded', (expanded ? 'true' : 'false'))
.trigger(namespace + ':' + (expanded ? 'open' : 'close'), [this]);
})
;
};
}));

@@ -7,5 +7,6 @@ {

"name": "Jan Sorgalla",
"url": "jan.sorgalla@dotsunited.de"
"email": "jan.sorgalla@dotsunited.de",
"url" : "https://dotsunited.de"
},
"version": "2.0.1",
"version": "2.1.0",
"repository": {

@@ -12,0 +13,0 @@ "type": "git",

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