【发布时间】:2012-08-21 02:07:18
【问题描述】:
我正在使用 twitter bootstrap 和 jquery validate 插件
我有一个看起来像这样的表单行:
<div class="form_row" >
<div class="control-group">
<label class="control-label" for="input01">home phone</label>
<div class="controls">
<input type="number" class="span4" class="input-xlarge" id="home_phone" name="home_phone" value="<?php echo $this->property->home_phone ?>" rel="popover" data-content="Re-enter your home phone." data-original-title="homephone" >
<input type="number" class="span4" class="input-xlarge" id="cell_phone" name="cell_phone" value="<?php echo $this->property->cell_phone ?>" rel="popover" data-content="Re-enter your cell_phone." data-original-title="cell_phone" >
</div>
验证后,当我在firebug中查看它时,有错误的输入后面是span.error。我想选择具有子项的 .control-group div,这些子项是 span.error
$(".control-group").filter(function() { return !($(this).children().('span.error'))})
这似乎不起作用。任何人都可以让它工作吗?
提前致谢,
比尔
【问题讨论】:
标签: jquery jquery-plugins twitter-bootstrap jquery-validate