New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

hamburger-icon-animate

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hamburger-icon-animate - npm Package Compare versions

Comparing version 0.1.1 to 0.2.0

24

js/hamburger-icon-animate.js

@@ -28,6 +28,20 @@ // Script for hamburger animations

hamburger.addEventListener('click', function(){
function listener() {
animateIcon(ui);
});
}
hamburger.addEventListener('click', listener);
return {
toCross: function() {
toCross(ui)
},
toBurger: function() {
toBurger(ui)
},
destroy: function() {
hamburger.removeEventListener('click', listener);
}
}
}

@@ -37,9 +51,5 @@

if(!ui.stateActive){
ui.stateActive = true;
toCross(ui);
ui.showMenu();
} else{
ui.stateActive = false;
toBurger(ui);

@@ -62,2 +72,3 @@ ui.hideMenu();

ui.stateActive = true;
} // end of toCross()

@@ -74,2 +85,3 @@

ui.stateActive = false;
} // end of toBurger()

@@ -76,0 +88,0 @@

{
"name": "hamburger-icon-animate",
"version": "0.1.1",
"version": "0.2.0",
"description": "Minimalist CSS3 hamburger animation",

@@ -5,0 +5,0 @@ "main": "js/hamburger-icon-animate.js",

@@ -49,3 +49,19 @@ # hamburger-icon-animate

## API
### hamburgerIcon([options])
Binds event handlers for animating the hamburger icon to the first element in the document matching the selector `.hia-hamburger`.
An object of `options` may be given:
- `showMenu`: A callback to be called each time the menu is shown (called at the *start* of the animation)
- `hideMenu`: A callback to be called each time the menu is hidden (called at the *start* of the animation)
```js
hamburgerIcon({
showMenu: function() { console.log('showing menu'); },
hideMenu: function() { console.log('hiding menu'); }
});
```
*Let me know of any issues or simply <a href="mailto:nymanchristine@gmail.com?Subject=hamburger" target="_top">say hi</a>.*
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