开发者

Jquery filter giving empty results

Why is this not working. I'm getting an empty array.

<select id="test">
<option value="Bar">Foo</option>
<option value="Bar1">Foo1</option>
<option value="">Foo2</option>
<option value="Bar3">Foo3</option&g开发者_运维技巧t;
<option value="Bar4" selected>Foo4</option>
<option value="Bar5">Foo5</option>
</select>

$('#test').find('option').filter(function() {
 this.selected && this.value.length
}).get();


You need to return your condition.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜