What is wrong/missing in my code.
I’m trying to makemultiple selections in options using multiple data concatenated from a string.
var nidText = "a;b;c;d"
var nidData = nidText.split(';');
$('#selectId option[value=' + nidData + ']').attr('selected', true);
In your code, the
nidDatais an array! Not a string. So you need to use$.eachor some looping function.Fiddle: http://jsfiddle.net/fbCeL/