user851889
user851889

Reputation: 63

selectedindexchanged event of dropdownlist is not working with jquery

hello I have a dropdownlist. I am using jquery plugin to give style to dropdownlist. jquery plugin is jquery.dd.js. but my problem is selectedindexchanged event is not working in Internet exlorer 8 although it is working fine in other browsers.

Upvotes: 5

Views: 26701

Answers (2)

RizzCandy
RizzCandy

Reputation: 121

Think would be better to use .val()

$('#yourSelectId').change(function() {
    var selectedVal = $('#yourSelectId').val();
});

Upvotes: 1

kleinohad
kleinohad

Reputation: 5912

try this:

$('#yourSelectId').change(function() {
    var selectedVal = $('#yourSelectId option:selected').attr('value');
});

you will get the value inside selectedVal

Upvotes: 19

Related Questions