I need to create a form that slides down two input fields when an error occurs, and I want them to have the bootstrap error class. The 'error' class works fine without the 'hide' class being present, but when the 'hide' class is included, it is ignored.
HTML:
<div class="control-group hide login">
<label class="control-label" style="color:red">Username</label>
<div class="control-group error">
<div class="controls">
<input type="text" class="input-large" name="username">
</div>
</div>
<label class="control-label" style="color:red">Password</label>
<div class="control-group error">
<div class="controls">
<input type="password" class="input-large" name="password">
</div>
</div>
</div>
jQuery:
$(".login").hide();
$(".login").slideToggle("slow");