Jquery filter giving empty results -


why not working. i'm getting empty array.

<select id="test"> <option value="bar">foo</option> <option value="bar1">foo1</option> <option value="">foo2</option> <option value="bar3">foo3</option> <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 return condition.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -