MR
.val()
используй .attr('data-value')
Size: a a a
MR
.val()
используй .attr('data-value')
А
AP
$el = $(this);
$el.val($el.data('value'));
A
Uncaught SyntaxError: Identifier 'hiddenFields' has already been declared
РА
РА
РА
VY
A
A
MR
$el = $(this);
$el.val($el.data('value'));
<script>
$("#select1").change(function() {
if ($(this).data('options') == undefined) {
$(this).data('options', $('#select2 option').clone());
}
$id = $(this);
$id.val($id.data('value'));
var options = $(this).data('options').filter('[data-value=' + id + ']');
$('#select2').html(options);
});
$('#select1').change();
</script>
MR
VY
A
A
VY
VY
A
VY