Simple jQuery Text Spoiler Reveal
How do I make an simple jquery text spoiler reveal?
A simple demonstration of revealing an element on click to display a hidden movie spoiler.. What is a simple jquery text spoiler reveal? How do you make a simple jquery text spoiler reveal? This script and codes were developed by Chris Steurer on 08 December 2022, Thursday.
Simple jQuery Text Spoiler Reveal - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Simple jQuery Text Spoiler Reveal </title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div> <p>The movie ends when<span class="spoiler"> the credits start rolling<span>. </p>
</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>
Simple jQuery Text Spoiler Reveal - Script Codes CSS Codes
.spoiler.hidden { visibility:hidden;
}
.revealPlaceHolder { font-size:0.85em; background:#efefef; margin:0.2em; padding:0.3em; text-align:center; color:#666;
}
.revealPlaceHolder:hover { background:#dbdbdb; cursor:pointer;
}
Simple jQuery Text Spoiler Reveal - Script Codes JS Codes
var $revealPlaceHolder = $('<span class="revealPlaceHolder"> Reveal Spoiler?<span>');
$(".spoiler").addClass("hidden");
$(".spoiler").before($revealPlaceHolder);
$(".revealPlaceHolder").click(function(){ $(this).hide(); $(this).next(".spoiler").removeClass("hidden")
});
Developer | Chris Steurer |
Username | stoypenny |
Uploaded | December 08, 2022 |
Rating | 3 |
Size | 1,913 Kb |
Views | 14,168 |
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 |
Button Hover Effects | 1,993 Kb |
Product Hover Display Cards | 2,648 Kb |
A Pen by Chris Steurer | 2,599 Kb |
Simple Contact Cards | 2,985 Kb |
Social Icon Buttons | 3,362 Kb |
Responsive Menu | 2,466 Kb |
Realistic Buttons | 2,248 Kb |
Responsive Coupon Code Containers | 3,818 Kb |
Basic Lightbox | 2,166 Kb |
Sign Up Form with live validation | 3,712 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 |
Right Click Menu | Anodpixels | 2,252 Kb |
Revolving Text Landing Page Trial | TimRuby | 2,976 Kb |
Disable JavaScript execution from console | Ludviglindblom | 2,534 Kb |
Drop Cap | Gsaiki | 1,571 Kb |
Hover Animation from UNIQLO | Insprd | 3,772 Kb |
How to add Css Fold Notes In Blogger By Askwithloud.com | Askwithloud | 2,280 Kb |
Drag in vanilla js using dotval math instead of translate | Paulq | 2,662 Kb |
CSS Org Chart | Appirio-ux | 3,882 Kb |
CardMove | Thompsonemerson | 3,699 Kb |
Wikipedia Viewer | Thomasvaeth | 2,549 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!