getting multiple values

getting multiple values


Hi,
i can't figure out why gettting multiple values doesn't work
i have to checkbox'es:
<label style="font-size: 12px; display: block;">
<input class="file_attachment" type="checkbox" checked="checked"
value="6" name="file[]"/>
ninja-assassin-337x500.jpg 49.82 K
</label>
<label style="font-size: 12px; display: block;">
<input class="file_attachment" type="checkbox" checked="checked"
value="5" name="file[]"/>
9 final movie poster Shane Acker.jpg 391.06 K
</label>
when selecting $('input.file_attachment') return two objects which is
good.
but when i try to extract the values like in documentatioin
$('input.file_attachment').val() || []
it return only the first value 6, instead of array of values [6, 5].
why is that?