Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- body.bg-color {
- background-color:red;
- }
- body.bg-img {
- background: url(../images/bg.jpg) no-repeat center 0 fixed;
- -webkit-background-size: cover;
- -moz-background-size: cover;
- -o-background-size: cover;
- background-size: cover;
- }
- $(document).ready(function(){
- $('body').addClass('bg-color');
- $('.element,#content1,#content2').hide();
- $("#link1").click(function(){
- $('#wrapper').hide();
- $('body').removeClass('bg-color').fadeOut();
- $('body').addClass('bg-img').fadeIn();
- });
- $("#link2").click(function(){
- $('#wrapper').show();
- $('body').removeClass('bg-img').fadeOut();
- $('body').addClass('bg-color').fadeIn();
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement