Skip to content

Instantly share code, notes, and snippets.

@corilam
Last active July 25, 2017 08:53
Show Gist options
  • Save corilam/72c102859d1f827f1a7bcd98ef74e843 to your computer and use it in GitHub Desktop.
Save corilam/72c102859d1f827f1a7bcd98ef74e843 to your computer and use it in GitHub Desktop.
Slide up newsletter subscribe
jQuery(document).ready(function(){
jQuery('#news-header').click(function(){
if(jQuery('#newsletter').hasClass('slide-show')){
jQuery('#newsletter').removeClass('slide-show');
}else{
jQuery('#newsletter').addClass('slide-show');
}
});
});
.slide-show{-moz-transform:translateY(-165px);-webkit-transform:translateY(-165px);transform:translateY(-165px);}
.newsletter-header{background-color:#0d2047;border-radius:5px 5px 0 0;width:400px;font-weight:900;color:#fff;padding:5px 15px;margin-right:50px}
.slide-bg{width:300px;right:15%}p.slide-bg{font-size:.8rem!important;line-height:1rem!important}#mc_embed_signup{width:230px!important;margin-top:-15px!important;text-align:center;}
.slide-hide{bottom:0!important}
.slide{z-index:101;right:20px;bottom:0}
#floating-newsletter{position:absolute;bottom:500px;}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment