Slide animation
How do I make an slide animation?
What is a slide animation? How do you make a slide animation? This script and codes were developed by Jerusha Johnson on 22 October 2022, Saturday.
Slide animation - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>slide animation</title> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha256-k2/8zcNbxVIh5mnQ52A0r3a6jAgMGxFJFE2707UxGCk= sha512-ZV9KawG2Legkwp3nAlxLIVFudTauWuBpC10uEafMHYL0Sarrz5A7G79kXh5+5+woxQ5HM559XX2UZjMJ36Wplg==" crossorigin="anonymous"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <section class="main-body"> <i class="fa fa-bars fa-2x menu"></i>
</section>
<section class="right-drawer"></section> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Slide animation - Script Codes CSS Codes
.main-body{ background: url(https://images.unsplash.com/photo-1438109491414-7198515b166b?fit=crop&fm=jpg&h=700&q=80&w=1050) no-repeat center center fixed; background-size: cover; position: absolute; width:100%; position: relative;
}
.menu{ position: absolute; top:15px; right: 15px; color:#fff; text-shadow:0 0 10px rgba(0,0,0,0.3); cursor:pointer;
}
.right-drawer{ width: 2000px; background: url(https://images.unsplash.com/photo-1434210330765-8a00109fc773?fit=crop&fm=jpg&h=600&q=80&w=1050) no-repeat center center fixed; background-size: cover; position: absolute; top:0; right:-2000px;
}
Slide animation - Script Codes JS Codes
var w_h = $(window).height();
$('.main-body').height(w_h);
$('.right-drawer').height(w_h);
$('.menu').on('click',function(){ if($(this).hasClass('fa-times')){ $('.main-body').animate({'right':'0'},200); $('.right-drawer').animate({'right':'-2000px'},200); $(this).removeClass('fa-times').addClass('fa-bars'); }else{ $('.main-body').animate({'right':'2000px'},400); $('.right-drawer').animate({'right':'0'},400); $(this).removeClass('fa-bars').addClass('fa-times'); }
});
Developer | Jerusha Johnson |
Username | bonzaipenguin |
Uploaded | October 22, 2022 |
Rating | 3 |
Size | 2,281 Kb |
Views | 6,072 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Recreate ScrollSpy v1 | 3,692 Kb |
TBI Thank You | 2,550 Kb |
A Pen by Jerusha Johnson | 2,135 Kb |
Project Showcase Idea | 2,741 Kb |
Logo for Carla v2 | 1,959 Kb |
Medium-esque v2.0 | 2,335 Kb |
Type Specimen | 2,414 Kb |
Objects 2.0 | 3,082 Kb |
Logo Trial v2 | 2,050 Kb |
X-axis and Y-axis Affixes | 3,803 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Boxes | H3l1um | 2,563 Kb |
Minimelephant | Smashlee | 2,507 Kb |
Kut D3 | Jellevrswk | 3,687 Kb |
Loading animation | Codeams | 2,408 Kb |
A Pen by Rob Levin | Roblevin | 2,787 Kb |
Pure CSS Menu | Bronsrobin | 3,321 Kb |
ABVI Menu Discarded | Overdrivemachines | 3,607 Kb |
Responsive Boxes without Images | Andymcfee | 4,120 Kb |
Glitchy Text Effect | Kescoe | 2,208 Kb |
Collapsing Widget | Er40 | 4,279 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!