If the option value and previous matches it won’t display in that drop down using jquery
Edit
Populating the selectbox based on user’s comment
$.each(g_Vehicle, function (index) {
var iYear = g_Vehicle[index].Year;
sMake = g_Vehicle[index].Make;
selectYear = '<option value="' + iYear + '">' + iYear + '</option>'; selectMake = '<option value="' + sMake + '">' + sMake + '</option>';
$("#DropDown_Year").append(selectYear);
$("#DropDown_Make").append(selectMake);
});
1 Answer