Created
January 31, 2013 17:52
-
-
Save mellowsh/4684782 to your computer and use it in GitHub Desktop.
Little function to echo out a dismiss-able alert utilizing Twitter Bootstrap's style.
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
| function alert($text,$type) { | |
| echo '<p class="alert alert-' . $type . '" fade in> | |
| <button type="button" class="close" data-dismiss="alert">×</button> | |
| ' . $text . ' | |
| </p>'."\r\n"; | |
| } | |
| alert('Request completed successfully!', 'success'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment