148
rated 0 times
[
150]
[
2]
/ answers: 1 / hits: 33249
/ 12 Years ago, thu, july 19, 2012, 12:00:00
I'm trying to create a button that can select next option.
So, i have a select (id=selectionChamp) with several options, an input next (id=fieldNext), and i try to do that :
$('#fieldNext').click(function() {
$('#selectionChamp option:selected', 'select').removeAttr('selected')
.next('option').attr('selected', 'selected');
alert($('#selectionChamp option:selected').val());
});
But I can not select the next option.. Thanks !
More From » jquery