I'm doing some form error handling/manipulation and I have the need to remove an error div that is before the input that is being validated...
HTML:
<p><div class="textError"></div><input type="text" name="someInputField" /></p>
如果输入字段经过验证,我想删除div.textError。我试过这个…
$(this).before('<div class="textError"></div>').remove('<div class="textError"></div>');
没有骰子。任何帮助都将不胜感激