I have a drop down with a selected option at index = 0. How can I in jquery get the value of the next option at index = 1? Of course I need to do that without specifying the value of the next option because I can;t assume what it will be at this point.
thx
You can write
$('#dropDownId option:selected').next().val()
Or
$('#dropDownId option:selected+option').val()
$('#selectid option:selected').next().val()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With