javascript - To create a transparent background for subscription box -


this going real tough me now, , can't solution this. hope many of must have seen site which, when enter site see homepage .. transparent layer comes , shows subscription box close button above it. can .. layout ..

it's simple, accomplished this

<div class="subscribecontainer">    subscribtion box here... </div> <style>     .subscribecontainer{        position:fixed;        left:0;        right:0;        bottom:0;        top:0;        background:transparent;/* default anyway or  next line */        background:rgba(0, 0, 0, 0.5); /* semi transparent */        display:none;/* hidden default */     } </style> 

then can use jquery fade .subscribecontainer in

$(document).ready(function(){     $('.togglesubscribebutton').on('click', function(){        $('.subscribecontainer').fadein('slow');     }); }); 

or if want fade in when window loads, so

$(window).load(function(){    $('.subscribecontainer').fadein('slow'); }); 

Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -