Created
March 13, 2014 06:14
-
-
Save gtallen1187/7e0f4b25e0904b12524e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function dyn_notice() { | |
var percent = 0; | |
var notice = $.pnotify({ | |
title: "Please Wait", | |
type: 'info', | |
icon: 'picon picon-throbber', | |
hide: false, | |
closer: false, | |
sticker: false, | |
opacity: .75, | |
shadow: false, | |
width: "170px" | |
}); | |
setTimeout(function() { | |
notice.pnotify({ | |
title: false | |
}); | |
var interval = setInterval(function() { | |
percent += 2; | |
var options = { | |
text: percent + "% complete." | |
}; | |
if (percent == 80) options.title = "Almost There"; | |
if (percent >= 100) { | |
window.clearInterval(interval); | |
options.title = "Done!"; | |
options.type = "success"; | |
options.hide = true; | |
options.closer = true; | |
options.sticker = true; | |
options.icon = 'picon picon-task-complete'; | |
options.opacity = 1; | |
options.shadow = true; | |
options.width = $.pnotify.defaults.width; | |
//options.min_height = "300px"; | |
} | |
notice.pnotify(options); | |
}, 120); | |
}, 2000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment