У меня есть строка html, которую мне нужно вставить во входное выделение, но оно выходит за рамки того, где находится входное выделение ... Я думаю, видите переменную параметров, которую я создаю? Он должен быть внутри следующего выбора после любого из классов .product ... пожалуйста, сообщите.
$(".product").change(function(){
//get selected option of the select that changed
var selected = $(this).val();
//then create the url to reference the value of the selected option (product id)
var url = "/order/getpricing/" + selected;
//remove all options from that nearby select statement
$(this).next('select').children().remove();
var pricelist = $(this).next('select');
$.getJSON(url, function(data, pricelist){
var options = '';
for(n = 0; n < data.length; n++){
options += '<option value="' + data[n].volumeID + '">' + explainPricing(data, n) + '</option>';
//setMeGlobal(options, "options");
}
$("#"+pricelist).html(options);
//TODO NEXT: SOMEHOW ADD OPTIONS TO THE SELECT!
});
$(this).next('select').html = options;
});