royhowie royhowie - 5 months ago 14
HTML Question

How can I show/hide a specific alert with twitter bootstrap?

Here's an example of an alert I'm using:

<div class="alert alert-error" id="passwordsNoMatchRegister">
<p>Looks like the passwords you entered don't match!</p>

I know that
will show/hide all the elements of the
class. However, I cannot figure out how to hide a specific alert, given its id.

I want to avoid using
, since that permanently removes the alert, and I need to be able to recall it.


You need to use an id selector:


# is an id selector and passwordsNoMatchRegister is the id of the div.