Bootstrap alert
How do I make an bootstrap alert?
What is a bootstrap alert? How do you make a bootstrap alert? This script and codes were developed by Tushar Mehrotra on 13 September 2022, Tuesday.
Bootstrap alert - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Bootstrap alert</title> <link rel='stylesheet prefetch' href='http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css'>
<link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body>
<body> <div class="container text-center"> <p>This is a bootstrap alert !!!</p> <button class="btn btn-danger">alert</button> </div>
</body> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Bootstrap alert - Script Codes CSS Codes
body{ background: #011627;
}
.container{ margin-top: 20px; z-index: 1;
}
.container p{ padding: 5px; color: #fff; font-size: 20px;
}
.overlay{ width: 100%; height: 100%; position: fixed; top: 0; left: 0; background: rgba(255,255,255,0.4); display: none; transition: all 2s ease-in-out;
}
.alert-warning{ background: #d9534f; padding: 0; position: relative; width: 70%; margin: 20px auto; border: none; transition: all 2s ease-in-out;
}
.btn.btn-danger{ margin-bottom: 20px; padding: 5px 30px; text-transform: uppercase; background: #ff9f1c; border: 1px solid #ff9f1c; font-weight: bold; font-size: 20px;
}
.alert-warning .close{ position: absolute; top: 6px; right: 7px; color: #fff; background: #d9534f; font-size: 24px; opacity: 1; }
.alert-warning .close span{ width: 20px; height: 20px;
}
.alert-warning p{ color: #fff; font-size: 20px; padding: 5px; margin: 0 5px
}
Bootstrap alert - Script Codes JS Codes
var $overlay = $('<div class="overlay"></div>');
var $alert = $('<div class="alert alert-warning" role="alert">');
var $button = $('<button type="button" class="close" aria-label="Close"></button>');
var $close = $('<i class="fa fa-times-circle"></i>');
var $p = $('<p></p>');
$alert.append($button);
$alert.append($p);
$button.append($close);
$overlay.append($alert);
$(".container").append($overlay);
$("button.btn-danger").on("click", function(){ $overlay.find($p).text("This is a custom bootstrap alert"); $overlay.fadeIn();
})
$button.on("click",function(e){ $overlay.fadeOut(); e.preventDefault();
})
Developer | Tushar Mehrotra |
Username | MTushar |
Uploaded | September 13, 2022 |
Rating | 3 |
Size | 2,509 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 |
React JS add project | 3,543 Kb |
React Tabs | 3,390 Kb |
Less Color Functions | 3,495 Kb |
JS Calculator | 3,213 Kb |
Show Hide Alert with Angular JS | 2,360 Kb |
Full Page JS jQuery Plugin | 2,029 Kb |
Form Email validation | 2,148 Kb |
React JS Movie Info App | 4,870 Kb |
Simple chatbot javascript | 2,442 Kb |
Angular ToDo App | 2,863 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 |
Css Rotating 3d cubes different speed | Dghez | 2,364 Kb |
Halo 5 REQ Guide Bookmarklet | Cwacht | 3,993 Kb |
Front in Aracaju Logo Pure CSS | Shankarcabus | 2,581 Kb |
CSS3 keyframe onload animation. | Samueljseay | 1,706 Kb |
Faces SVG animation | ScavengerFrontend | 2,957 Kb |
Header | Er40 | 1,542 Kb |
Force Counter | Kenlauguico | 2,732 Kb |
Adding and Removing Element | Accimeesterlin | 2,119 Kb |
Right Click Menu | Anodpixels | 2,252 Kb |
A Pen by Malith Hettiarachchi | MalZiiirA | 5,531 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!