Simple Modal
How do I make an simple modal?
Simple Modal. What is a simple modal? How do you make a simple modal? This script and codes were developed by Chris Maki on 12 August 2022, Friday.
Simple Modal - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Simple Modal</title> <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"> <button class="show-modal open-modal">Open Modal</button> <div class="modal"> <a class="close-modal" href="#">X</a> <div>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Incidunt sit quas aut labore nam quis qui eos quasi soluta sunt nihil voluptate expedita. Aliquam aliquid excepturi ex ab fuga ipsa?</div> </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>
Simple Modal - Script Codes CSS Codes
.container {width: 500px; margin: 50px auto}
.open-modal { background-color:#5cf9d2; border: none; border-radius: 4px; color: #fff; outline: none; padding: 20px 40px; text-transform: uppercase
}
.open-modal:hover {background-color: #bff2e5}
.modal { background-color: #dbd9d9; display: none; position: fixed; top: 50%; left: 50%; width: 400px; height: 200px; margin-left: -200px; margin-top: -150px; padding: 50px; border-radius: 5px; z-index: 10; box-shadow: 0 0 0 99999px rgba(0, 0, 0, 0.7);
}
.close-modal { color: #000; text-decoration: none; float: right; position: absolute; top: 10px; right: 20px
}
Simple Modal - Script Codes JS Codes
var modal = $('.modal');
$('.show-modal').click(function() { modal.fadeIn();
});
$('.close-modal').click(function() { modal.fadeOut();
});
Developer | Chris Maki |
Username | chrisMaki |
Uploaded | August 12, 2022 |
Rating | 3 |
Size | 2,114 Kb |
Views | 40,480 |
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 |
Accordion with pagination | 4,650 Kb |
Show dialogue with blur animation | 2,085 Kb |
Overlay using mix-blend-mode | 2,771 Kb |
Light bulb svg loader | 2,344 Kb |
Simple Responsive Modal | 2,272 Kb |
Mobile navigation using GSAP | 3,145 Kb |
Scroll to view if element partially out of view port height | 2,104 Kb |
Morphing svg using Kute.js | 2,417 Kb |
A Pen by chris maki | 2,711 Kb |
Velocity fade in | 2,062 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 |
About Us | Francescaedits | 1,902 Kb |
Michelle, submit your photography to Unsplash. | Zaneriley | 3,368 Kb |
Flat UI - Checkbox FIX | ARS | 2,663 Kb |
Weather App 2 | MightyJoeW | 2,877 Kb |
Avero - Collectieve LVVP Arbeidsongeschiktheidsverzekering - CSS - som | Frederiquebonink | 12,554 Kb |
Falling Down the Rabbit Hole | Rachelnabors | 4,578 Kb |
SVG Text Masking | JMChristensen | 2,141 Kb |
Cloudy Spiral CSS animation | Hakimel | 6,587 Kb |
Example SVGZ Data URI | Joeyhoer | 2,981 Kb |
Popover | Teles | 2,248 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!