Is it possible to style default JS alerts using Twitter Bootstrap? For example:
alert("You can select maximum 8 files at once.");
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can’t style normal alert windows. Their look and feel is controlled by the OS. The best you can do is shadow the real
alertfunction with one of your own. For example, you could overridealertwith a function that writes the message to console instead:In your custom
alertmethod you could open one of Bootstrap’s modal windows with the message.Here’s a working example of the above code.