Spoiler Revealer
How do I make an spoiler revealer?
We are covering spoilers so anyone can choose if they want to click and read, or just to skip that part. What is a spoiler revealer? How do you make a spoiler revealer? This script and codes were developed by MoyArt Maximus on 09 July 2022, Saturday.
Spoiler Revealer - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Spoiler Revealer</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <p class="spoiler"> In Game Of Thrones <span>Everybody DIES!!!</span>
</p> <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Spoiler Revealer - Script Codes CSS Codes
body{ background-color: #333; color: #00c0ff;
}
p{ font-family: helvetica, arial, open-sans, sans-serif; font-size: 120%;
}
Spoiler Revealer - Script Codes JS Codes
// Prevent spoilerphobes from seeing spoilers.
// Solution: Hide Spoilers and reveal them through user interaction.
//1.- hide spoiler
$(".spoiler span").hide();
//2.- Add a button
$(".spoiler").append("<button>Reveal Spoiler!</button>");
//3.- When button pressed
$(".spoiler button").click(function(){ //3.1.- Show Spoiler, We traverse the DOM to only affect one element in particular // in case we have a lot of spoilers in our page. //this line will show the spoiler next to the button clicked $(this).prev().show(); //3.2.- Get rid of button $(this).remove()
})
Developer | MoyArt Maximus |
Username | MoyArt |
Uploaded | July 09, 2022 |
Rating | 3 |
Size | 2,023 Kb |
Views | 54,648 |
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 |
Horizontal Card | 2,132 Kb |
Numeros a cantidades | 1,420 Kb |
Function HTML Print | 1,643 Kb |
Clase Sass | 2,295 Kb |
Select con paises | 3,739 Kb |
CSS Radio Button | 1,946 Kb |
Propiedades comunes Css | 1,697 Kb |
Elementos Semanticos | 1,619 Kb |
Todo List | 1,671 Kb |
Elementos Bloque y Elementos Inline | 1,606 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 |
SVG Playground | Roygwells | 1,834 Kb |
Custom Select Element | Agrayson | 3,616 Kb |
Jquery 2d character movement | Drewtadams | 4,291 Kb |
Pomodoro Timer | Sdas13 | 2,900 Kb |
Animated SVG stroke-dasharray | Netsi1964 | 3,179 Kb |
Parallax scrolling scene | Iharosi | 2,485 Kb |
Fluid Responsive Typography | Jonmilner | 4,205 Kb |
Popover | Teles | 2,248 Kb |
Transition | Shayhowe | 1,632 Kb |
Awesome Full Page Menu Nav | Ey_intuitive | 4,194 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!