In a situation where I have something like this code:
$(document).on('change', '.color_select', function() {
var id = $(this).val(); //get the current value's option
$.ajax({
type:'POST',
url: "functions/getSize.php",
data:{'id':id},
success:function(data){
var size = $(".size_select");
$(".size_select").html(data); // i need to define this with a dynamic way
}
});
});
Is there any way to define $(".size_select").html(data);
in dynamic way like this
$(document).on('change', '.color_select', function() {
var id = $(this).val(); //get the current value's option
????