-
-
Save jawinn/9729363 to your computer and use it in GitHub Desktop.
jQuery Mobile - Toast-style popup, modified
This file contains hidden or 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
// JQuery Mobile Android-style Toast popup | |
// https://gist.github.com/kamranzafar/3136584 | |
// Usage: toast("Your Message Here"); | |
var toast = function(msg){ | |
$("<div class='ui-loader ui-overlay-shadow ui-body-e ui-corner-all'><h4>"+msg+"</h4></div>") | |
.css({ display: "block", | |
opacity: 0.96, | |
"background-color": "#332C2C", | |
"z-index":"9999", | |
position: "fixed", | |
padding: "0", | |
"text-align": "center", | |
width: "80%", | |
left: "10%", | |
top: $(window).height()/2 }) | |
.appendTo( $.mobile.pageContainer ).delay( 1500 ) | |
.fadeOut( 800, function(){ | |
$(this).remove(); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment