Posted By

blipz on 10/06/10


jquery text selected

Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


jquery get selected text

 / Published in: jQuery


very minimal way to get the value and text of a combo box using jquery

  1. $('#select').change(function() {
  2. var text = jQuery(this).find(':selected').text(); //get the option text
  3. var value = jQuery(this).val(); //get the option value
  4. });

Report this snippet  

You need to login to post a comment.