I know I can select an option in a select box by doing
$('#selectBox :nth-child(4)').attr('selected', 'selected');
But how can I do this through a returned jQuery object? e.g. something like
var box = $('#selectBox');
$(box :nth-child(4)').attr('selected', 'selected');
You can use
children:BTW, starting from jQuery 1.6 you can use
propinstead ofattr: