diff --git a/css/component.css b/css/component.css index c151020..12ffd06 100755 --- a/css/component.css +++ b/css/component.css @@ -119,7 +119,7 @@ } /* Morph Button Style: Modal */ -.morph-button-modal::before { +.morph-button-modal .modal { position: fixed; top: 0; left: 0; @@ -132,14 +132,15 @@ -webkit-transition: opacity 0.5s; transition: opacity 0.5s; pointer-events: none; + display: block; } -.morph-button-modal.open::before { +.morph-button-modal.open .modal { opacity: 1; pointer-events: auto; } -.morph-button-modal.active::before { +.morph-button-modal.active .modal { z-index: 1800; } @@ -495,4 +496,4 @@ .morph-button-sidebar.open .morph-content { height: 100% !important; } -} \ No newline at end of file +} diff --git a/index.html b/index.html index 969d9b5..f5705d0 100755 --- a/index.html +++ b/index.html @@ -13,6 +13,7 @@ +
@@ -39,6 +40,7 @@

Morphing Buttons Concept

Pea horseradish azuki bean lettuce avocado asparagus okra.

+
@@ -56,6 +58,7 @@

Login

or
+
@@ -152,7 +155,17 @@

Sidebar Transitions

[].slice.call( document.querySelectorAll( 'form button' ) ).forEach( function( bttn ) { bttn.addEventListener( 'click', function( ev ) { ev.preventDefault(); } ); } ); + + $(document).keyup(function(e) { + if (e.keyCode == 27) { + // escape + $('.active .icon-close').click(); + } + }); + $('.modal').click(function() { + $('.active .icon-close').click(); + }); })(); - \ No newline at end of file +