1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107
|
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>jQuery UI Dialog - Animation</title>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.1/themes/base/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.1/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css" />
<script>
$(function()
{
$( "#dialog" ).dialog
({
autoOpen: false,
show:
{
effect: "size",
duration: 1000
},
resizable: false,
height:180,
modal: true,
buttons:
{
"Envoyer": function()
{
$(function()
{
$( "#dialog-message" ).dialog
({
resizable: false,
height:180,
modal: true,
buttons:
{
"Fermer la fênetre": function()
{
$( this ).dialog( "close" );
}
}
});
dec();
});
$( this ).dialog( "close" );
},
"Annuler": function()
{
$( this ).dialog( "close" );
}
}
});
$( "#opener" ).click
(
function()
{
$( "#dialog" ).dialog( "open" );
}
);
function dec()
{
var cpt = 10;
timer = setInterval(function()
{
if(cpt>0)
{
document.getElementById("mssg").innerHTML = "La page se fermera automatiquement dans " + cpt + "sec" ;
--cpt;
}
else
{
$("#dialog-message").dialog( "close" );
}
}, 1000);
}
});
</script>
</head>
<body>
<div id="dialog" style="font-size:15px;" title="yop">
<p style="font-size:13px;"><span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span>These items will be permanently deleted and cannot be recovered. Are you sure?</p>
</div>
<button id="opener">Open Dialog</button>
<div style="display: none;" id="dialog-message" title="yop envoyé">
<p>
<span class="ui-icon ui-icon-circle-check" style="float: left; margin: 0 7px 50px 0;"></span>
Your files have downloaded successfully into the My Downloads folder.
</p>
<p style="font-size:15px;" id="mssg"> </p>
</div>
</body>
</html> |
Partager