Wishlist Toggle Button
How do I make an wishlist toggle button?
Super basic wishlist toggle idea. Feel free to use.. What is a wishlist toggle button? How do you make a wishlist toggle button? This script and codes were developed by Matt Litherland on 15 January 2023, Sunday.
Wishlist Toggle Button - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Wishlist Toggle Button</title> <script src="https://s.codepen.io/assets/libs/modernizr.js" type="text/javascript"></script> <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> <div class="container"> <h1>Wishlist Toggle Button</h1> <div class="wishlist-container"> <span class="wishlist toggled"> <span class="entypo-heart"></span> </span> <span class="wish-add"> <a href="#">Wishlist</a> </span> </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>
Wishlist Toggle Button - Script Codes CSS Codes
/* Demo CSS Only
*/
@import url(https://fonts.googleapis.com/css?family=Doppio+One);
@import "http://weloveiconfonts.com/api/?family=entypo";
body, html { height: 100%; width: 100%; padding: 0; margin: 0;
}
a, a:link, a:active, a:visited { text-decoration: none;
}
body { background: #1a5f82; background: -moz-linear-gradient(-45deg, #1a5f82 0%, #6ac4c4 100%); background: -webkit-gradient(linear, left top, right bottom, color-stop(0%, #1a5f82), color-stop(100%, #6ac4c4)); background: -webkit-linear-gradient(-45deg, #1a5f82 0%, #6ac4c4 100%); background: -o-linear-gradient(-45deg, #1a5f82 0%, #6ac4c4 100%); background: -ms-linear-gradient(-45deg, #1a5f82 0%, #6ac4c4 100%); background: linear-gradient(135deg, #1a5f82 0%, #6ac4c4 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#1a5f82', endColorstr='#6ac4c4',GradientType=1 );
}
/* Example CSS
*/
.container { display: block; width: 60%; max-width: 600px; margin: 0 auto; text-align: center; padding: 20px 0;
}
.container h1 { font-family: "Doppio One", sans-serif; color: #f0e284; text-shadow: 1px 1px 10px rgba(0, 0, 0, 0.2);
}
.container .wishlist-container { display: inline-block; width: 100%; padding: 25px 0; background: #fff; border-radius: 15px;
}
/* Entypo */
[class*="entypo-"]:before { font-family: "entypo", sans-serif;
}
.entypo-heart { background: #fff; height: 24px; width: 24px; float: left; display: block; border-radius: 50%; color: #a5b2bf; line-height: 24px; padding: 0;
}
.wishlist.animate span.entypo-heart { color: #fff; background: #ee8b94; -webkit-transition: all 0.25s ease; transition: all 0.25s ease; -webkit-transform: rotateZ(360deg); transform: rotateZ(360deg);
}
.wishlist.toggled span.entypo-heart { color: #a5b2bf; background: #fff; -webkit-transition: all 0.65s ease; transition: all 0.65s ease; -webkit-transform: rotateZ(-360deg); transform: rotateZ(-360deg);
}
.wishlist { display: inline-block; width: 24px; height: 24px; -webkit-transition: all 0.25s ease; transition: all 0.25s ease;
}
.wishlist,
.wishlist span,
.wishlist a { color: #a5b2bf;
}
.wish-add { position: relative; display: inline-block; width: auto; overflow: hidden;
}
.wish-add a { position: relative; display: inline-block; width: 100%; font-family: "Open Sans", sans-serif; line-height: 24px; white-space: nowrap; color: #a5b2bf; -webkit-transition: all 0.15s ease; transition: all 0.15s ease;
}
.wish-add a.added { color: #ee8b94; -webkit-transition: all 0.25s ease; transition: all 0.25s ease;
}
.wish-add.mini a { width: 0%; -webkit-transition: all 0.25s ease; transition: all 0.25s ease;
}
Wishlist Toggle Button - Script Codes JS Codes
// ------------------------------
// Heart this pen & Follow me :)
// ------------------------------
$('.wish-add').bind('click', function(e) { e.preventDefault(); $('.wish-add a').toggleClass('added'); $('.wishlist').toggleClass('toggled animate');
});
Developer | Matt Litherland |
Username | mattsince87 |
Uploaded | January 15, 2023 |
Rating | 3 |
Size | 3,774 Kb |
Views | 18,216 |
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 |
SVG Firework Animation | 3,306 Kb |
Gradient over Google Maps | 4,329 Kb |
Google Inspired CSS Preloader | 3,008 Kb |
Smooth Anchor Scrolling | 4,508 Kb |
Ultimate Pop-Out Menu | 4,264 Kb |
Node Waves | 3,216 Kb |
Animated CSS3 Mobile Phone | 4,609 Kb |
SCSS Social Icons Flat | 3,482 Kb |
Slick Two Part Form | 6,199 Kb |
Animated Resposnive SVG Path | 5,339 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 |
TinFoil Boats | Chandralil | 4,577 Kb |
Coming Soon | MariamMassadeh | 1,680 Kb |
Fixed Scrolling Nav Bar | Philsinatra | 0 Kb |
Siema - add pagination to prototype | Pawelgrzybek | 2,575 Kb |
Another brick in the wall | Fivera | 1,955 Kb |
About Us | Francescaedits | 1,902 Kb |
CSS Colors | Alexpate | 2,232 Kb |
Experiment - SCSS SVG Background Image with Variables | See8ch | 3,270 Kb |
Wikipedia Viewer | Codinger | 4,681 Kb |
Ocean | Gordonnl | 2,817 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!