1

I want to get the next value of selected value in the dropdown by JQuery. how to do ?

1
  • 1
    Can you show an example of what you mean by "next value of selected value"? Commented Sep 27, 2010 at 11:56

2 Answers 2

6

Assuming you think of select when you say dropdown: $("dropdown_selector option:selected").next().val()

Sign up to request clarification or add additional context in comments.

Comments

0
if ($("myselect").options[selectedIndex] < $("myselect").items.length)
      alert($("myselect").options[$("myselect").selectedIndex+1].text);
else
      alert($("myselect").options[$("myselect").selectedIndex].text);

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.