Try:
 ...
var selector = $('#selectList');
selector.change(function() {
var directory = $('option[selected]').text(); // if you want get the option text

or

var directory = $('option[selected]').attr('id'); // if you want get the option 
id
...

  -----Mensagem Original----- 
  De: Y vd Bogert 




  In my html select code i've got the following options:
  <select name="dir" id="selectList">
    <option id="introductie">introductie</option>
    <option id="offertes">offertes</option>
  </select>

  But when i select offertes it always shows my value as introductie?

  ...
                  var selector = $('#selectList');
                  selector.change(function() {
                    var directory = selector.val();
  ...

Reply via email to