jquery: why a selector returns me an array, but attribute doesnt?
- by Shlomi.A.
Hi.
I'm trying to understand JQ better.
I'm calling an JQ object
$(".FamiliesList li li span[class!='']").prev().find('option:selected')
this returns back to me an array of all the options that their span parent's brother has a classname.
[option, option]
Now- I want to return back an array of the option's values
$(".FamiliesList li li span[class!='']").prev().find('option:selected').attr('value')
this returns back to me only the first child value, and a full array of the values.
Why?
I would appreciate to receive help and understand jq better :)
Thanks.