JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
<a href="#" class="topopup">Opret</a>
<div id="toPopup">
<div class="close"></div>
<span class="ecs_tooltip">Luk (ESC)<span class="arrow"></span></span>
<div id="popup_content">
<font style="font-color:#CC272D"><h2>Opret bruger</h2></font><br />
blabla
</div>
</div>
<div class="loader"></div>
<div id="backgroundPopup"></div>
CSS
/*
author: istockphp.com
*/
#backgroundPopup {
z-index:9999999;
position: fixed;
display:none;
height:100%;
width:100%;
background:#000000;
top:0px;
left:0px;
}
#toPopup,#toPopup2,#toPopup3,#toPopup4,#toPopup5,#toPopup6,#toPopup7,#toPopup8,#toPopup9,#toPopup10 {
font-family: "lucida grande",tahoma,verdana,arial,sans-serif;
background: none repeat scroll 0 0 #FFFFFF;
border: 10px solid #ccc;
border-radius: 3px 3px 3px 3px;
color: #333333;
display: none;
font-size: 14px;
left: 50%;
margin-left: -402px;
position: fixed;
top: 20%;
width: 800px;
z-index: 999999999999999;
}
div.loader {
background: url("../img/loading.gif") no-repeat scroll 0 0 transparent;
height: 32px;
width: 32px;
display: none;
z-index: 9999;
top: 40%;
left: 50%;
position: absolute;
margin-left: -10px;
}
div.close {
background: url("../img/closebox.png") no-repeat scroll 0 0 transparent;
bottom: 24px;
cursor: pointer;
float: right;
height: 30px;
left: 27px;
position: relative;
width: 30px;
}
span.ecs_tooltip {
background: none repeat scroll 0 0 #000000;
border-radius: 2px 2px 2px 2px;
color: #FFFFFF;
display: none;
font-size: 11px;
height: 16px;
opacity: 0.7;
padding: 4px 3px 2px 5px;
position: absolute;
right: -62px;
text-align: center;
top: -51px;
width: 93px;
}
span.arrow {
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-top: 7px solid #000000;
display: block;
height: 1px;
left: 40px;
position: relative;
top: 3px;
width: 1px;
}
div#popup_content {
margin: 4px 7px;
}
JavaScript
/*
author: istockphp.com
*/
jQuery(function($) {
$("a.topopup").click(function() {
loading(); // loading
setTimeout(function(){ // then show popup, deley in .5 second
loadPopup(); // function show popup
}, 200); // .5 second
return false;
});
$("a.topopup2").click(function() {
loading(); // loading
setTimeout(function(){ // then show popup, deley in .5 second
loadPopup2(); // function show popup
}, 200); // .5 second
return false;
});
$("a.topopup3").click(function() {
loading(); // loading
setTimeout(function(){ // then show popup, deley in .5 second
loadPopup3(); // function show popup
}, 200); // .5 second
return false;
});
$("a.topopup4").click(function() {
loading(); // loading
setTimeout(function(){ // then show popup, deley in .5 second
loadPopup4(); // function show popup
}, 200); // .5 second
return false;
});
$("a.topopup5").click(function() {
loading(); // loading
setTimeout(function(){ // then show popup, deley in .5 second
loadPopup5(); // function show popup
}, 200); // .5 second
return false;
});
$("a.topopup6").click(function() {
loading(); // loading
setTimeout(function(){ // then show popup, deley in .5 second
loadPopup6(); // function show popup
}, 200); // .5 second
return false;
});
$("a.topopup7").click(function() {
loading(); // loading
setTimeout(function(){ // then show popup, deley in .5 second
loadPopup7(); // function show popup
}, 200); // .5 second
return false;
});
$("a.topopup8").click(function() {
loading(); // loading
setTimeout(function(){ // then show popup, deley in .5 second
loadPopup8(); // function show popup
}, 200); // .5 second
return false;
});
$("a.topopup9").click(function() {
loading(); // loading
setTimeout(function(){ // then show popup, deley in .5 second
loadPopup9(); // function show popup
}, 200); // .5 second
return...