jquery - fading out a Javascript error message -
i have error message pops whenever form element not validate. however, reason error message not fade out.
html:
<div class="span6"> <p id="error-message"></p> </div>
javascript:
if (response.error) { $('#error-message').addclass('alert alert-success').html("the charge successful. choosing somii!"); $("#error-message").fadeout(3000); }
once error message fades out, never seen. have make visible again.
$("#error-message").show();
see test fiddle at: http://jsfiddle.net/johnnyworker/sc7zm/. press "fire" trigger.
it working on chrome , ie10.
Comments
Post a Comment