<script src="https://code.jquery.com/jquery-3.0.0.min.js"></script>
<script src="https://cdn.rawgit.com/Gnostice/PopupDialog/master/Scripts/src/PopupDialog.js"></script>
<link rel="stylesheet" href="https://cdn.rawgit.com/Gnostice/PopupDialog/master/StyleSheet/PopupDialog.css">
<h3>jQuery PopupDialog Library</h3>
PopupDialog Type :
<select id="popUpTypeId">
<option>WarningMessageBox</option>
<option>InfoMessageBox</option>
<option>SuccessMessageBox</option>
<option>ErrorMessageBox</option>
<option>ProgressPopUpBox</option>
</select>
Position :
<select id="popUpPositionId">
<option>TopLeft</option>
<option>TopRight</option>
<option>BottomLeft</option>
<option>BottomRight</option>
<option>Center</option>
</select>
<input id="showBottonId" type="button" value="Show" />
<div id="parentDivId" style="height:350px;width:600px;background-color:aquamarine;position:relative;">
<p>The standard Lorem Ipsum passage, used since the 1500s</p>
<span>"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
Section 1.10.32 of "de Finibus Bonorum et Malorum", written by Cicero in 45 BC
"Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi...
JavaScript
$(document).ready(function () {
$("#showBottonId").on("click", function () {
var popUpTypeText = $("#popUpTypeId").val();
var popUpPositionText = $("#popUpPositionId").val();
var parentDivObj = $("#parentDivId");
var messageBox = null;
switch (popUpTypeText) {
case "WarningMessageBox":
messageBox = new gnostice.WarningMessageBox(parentDivObj, "This is a warning message box", true);
break;
case "InfoMessageBox":
messageBox = new gnostice.InfoMessageBox(parentDivObj, "This is an information message box", true);
break;
case "SuccessMessageBox":
messageBox = new gnostice.SuccessMessageBox(parentDivObj, "This is a success message box", true);
break;
case "ErrorMessageBox":
messageBox = new gnostice.ErrorMessageBox(parentDivObj, "This is an error message box", true);
break;
case "ProgressPopUpBox":
messageBox = new gnostice.ProgressPopUpBox(parentDivObj, true);
messageBox.setMinimum(1);
messageBox.setMaximum(100);
var i = 1;
var recursionCall = function () {
console.log(i);
if (i <= 10) { messageBox.setValue(10 * i); i++; }
setTimeout(recursionCall, 1000);
}
recursionCall();
//var i = 1;
//setInterval(function () { if (i <= 10) { messageBox.setValue(10 * i); i++; } }, 500);
break;
}
switch (popUpPositionText) {
case...
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Fiddle Pages
Your fiddles accessible under a custom domain and a vanity path - the simplest hosting for your personal project.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Get Fiddle Pages with PRO
Your fiddles accessible under a custom domain and a vanity path - the simplest hosting for your personal project.