fix intro closed intro position

Georg Fischer 2013-12-16 15:42:19 +01:00
parent 3cdcf52f70
commit 320950bacb
2 changed files with 9 additions and 2 deletions

@ -33,6 +33,7 @@ define(
{ {
button.classList.add( 'is-active' ); button.classList.add( 'is-active' );
element.classList.add( 'is-active' ); element.classList.add( 'is-active' );
element.style.top = '0';
is_open = true; is_open = true;
} }
@ -40,9 +41,15 @@ define(
{ {
button.classList.remove( 'is-active' ); button.classList.remove( 'is-active' );
element.classList.remove( 'is-active' ); element.classList.remove( 'is-active' );
element.style.top = -getHeight() + 'px';
is_open = false; is_open = false;
} }
function getHeight()
{
return element.clientHeight;
}
return { init: init }; return { init: init };
} }
); );

@ -106,8 +106,8 @@ a:hover {
top: -100%; top: -100%;
background-color: #fff; background-color: #fff;
background-color: rgba(255,255,255, 0.9); background-color: rgba(255,255,255, 0.9);
-webkit-transition: all 0.5s ease-in; -webkit-transition: all 0.3s ease-out;
transition: all 0.5s ease-in; transition: all 0.3s ease-out;
} }
.intro.is-active { .intro.is-active {