Чето получилось:
var arr=[
{
value: 6,
list: [
{
value: 0,
text: 'A3'
},
{
value: 1,
text: 'A4'
},
{
value: 2,
text: 'A5'
}
]
},
{
value: 7,
list: [
{
value: 0,
text: 'M3'
},
{
value: 1,
text: 'M6'
},
{
value: 2,
text: 'X5'
},
{
value: 3,
text: 'X6'
}
]
},
];
$("#category").change(function() {
selval = $(this).val();
forval = arr[selval - 6].list;
$("#selectmodel").empty();
$.each(forval, function(i, val) {
$("#selectmodel").append("<option value='"+val.text+"'>"+val.text+"</option>");
})});
$("#selectmodel").change(function() {
text = $(this).val();
$("#xf_model").val(text);
});