I am using FuncUnit with qunit to test an application. I would like to set selected
property of an option of <select>
menu to be true
.
In jQuery
, I could do something like
$('select#id option:eq(0)').prop('selected', true).change();
to achieve this. But, in funcunit,
S('select#id option:eq(0)').prop('selected', true).trigger('change');
selector finds the element and just get (not set) the value of prop selected
. I want to set prop of the element.