Expandable Left Side Bar with jQuery animate
How do I make an expandable left side bar with jquery animate?
The animation as the left side bar slides right uses jquery animate instead of css. What is a expandable left side bar with jquery animate? How do you make a expandable left side bar with jquery animate? This script and codes were developed by Retrofuturistic on 19 January 2023, Thursday.
Expandable Left Side Bar with jQuery animate - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Expandable Left Side Bar with jQuery animate</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="page"> <div class="sidebar"> <h2>TC</h2> <ul> <li><span class="leader">A</span><span class="detail">gency</span></li> <li><span class="leader">S</span><span class="detail">tories</span></li> <li><span class="leader">C</span><span class="detail">ase Studies</span></li> </ul> </div> <div class="content"> <p> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> </div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Expandable Left Side Bar with jQuery animate - Script Codes CSS Codes
body{ margin:0; padding:0; background:#eee;
}
.page { margin:0; padding:0; }
.sidebar { position:fixed; top:0; left:0; height:100%; width:50px; background:#666; font-family:sans-serif; color:#fff; -webkit-transition: width 0.5s linear; overflow:hidden;
}
.sidebar h2 { padding-left:7px;
}
.sidebar ul { list-style:none; padding:0; margin:0;
}
.sidebar ul li { display:block; border-top:1px solid #999; overflow:hidden; padding:10px; height:20px; width:150px; overflow:hidden;
}
.sidebar ul li:last-child { border-bottom:1px solid #999;
}
.sidebar span.leader { opacity:1; width:7px; font-weight:bold;
}
.sidebar span.detail{ opacity: 0;
}
.content { position:relative; left:52px; padding-left:20px; width:600px; margin-left:auto; margin-right:auto; margin-top: 50px; -webkit-transition: left 0.5s linear;
}
Expandable Left Side Bar with jQuery animate - Script Codes JS Codes
$('.sidebar').mouseenter(function(e) { //slide the drawer $('.sidebar').animate({width: "150px"},200,"linear"); //show the draw elements $('.sidebar span.detail').animate({opacity: 1},400,"linear"); //slide the content $('.content').animate({left:"150px"},200,"linear");
});
$('.sidebar').mouseleave(function(e) { //slide the drawer $('.sidebar').animate({width: "50px"},200,"linear"); //show the draw elements $('.sidebar span.detail').animate({opacity: 0},400,"linear"); //slide the content $('.content').animate({left:"52px"},200,"linear");
});
Developer | Retrofuturistic |
Username | retrofuturistic |
Uploaded | January 19, 2023 |
Rating | 3 |
Size | 2,483 Kb |
Views | 4,048 |
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 |
Slide Toggle Menu | 1,772 Kb |
CSS Multicolor Trefoil | 1,800 Kb |
Country List with Pagination | 2,437 Kb |
Dynamically Generated Country List | 2,108 Kb |
Inverted Border Radius Sidebar | 1,761 Kb |
CSS-Centered Modal Window | 2,618 Kb |
Newton Balls Loading Animation | 2,426 Kb |
Responsive Skewed Text with Images | 2,197 Kb |
Responsive Cards Layout | 2,444 Kb |
Processing Daisy Wheel | 1,874 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 |
TestTube CSS | EZPK | 2,710 Kb |
Apple website | Jds317 | 1,835 Kb |
Easing | GreenSock | 2,043 Kb |
Rainbow Drops | Csbarnes | 2,365 Kb |
Word Wrap Algorithm for Multiline Canvas Text | Peterhry | 2,349 Kb |
Filtering with shuffle.js | Deyand | 2,712 Kb |
Single element checkbox | Ivijaygupta | 1,996 Kb |
JQuery AJAX reddit Exercise | Btholt | 1,777 Kb |
Simple star rating using js and data-uri | TheEnd | 5,795 Kb |
Experiments with Vertical Centering | KatieK2 | 3,924 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!