var element = $("div.form-errors"); | |
if (formHasErrors()) { | |
element.show(); | |
} | |
// More, unrelated code... | |
var element = $("form#login"); | |
element.addClass("has-errors"); | |
// Another block of code... | |
$("input.submit").on("click", function() { | |
element.remove(); | |
// ... | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment