Created
January 31, 2018 11:20
-
-
Save wotchin/5da42fe0ccb29d8abbd5ffbde886d84f to your computer and use it in GitHub Desktop.
Modal-Alert replace alert() function.
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 modalRender(text) { | |
var modal = $("<div class=\"modal fade\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"alertModal\" aria-hidden=\"true\"></div>").append( | |
$("<div class=\"modal-dialog\"></div>").append( | |
$("<div class=\"modal-content\"></div>").append( | |
$("<div class=\"modal-body\">"+text+"</div>") | |
) | |
) | |
); | |
modal.modal(); | |
} | |
//ps. | |
//dependence jQuery. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
rely on jquery and bootstrap.