【发布时间】:2012-08-20 20:32:01
【问题描述】:
我正在使用 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>
</div>
验证后,当我在firebug中查看它时,有错误的输入后面是span.error。我想选择这些输入。到目前为止,我有:
$.filter(function() { return $(this).next("span.error"); })
但我收到以下错误:
TypeError: elems 未定义 [打破这个错误]
return elems.length === 1 ?
谁能帮帮我?
谢谢,
比尔
【问题讨论】:
标签: jquery jquery-plugins twitter-bootstrap jquery-validate