<div class="tr">click clone</div>
<div class="on-mobile">
<div class="form-row">
<select name="ItemToOrders[0][Qty]" id="s1" class="aa">
<option value="tt">tt</option>
<option value="tr">tr</option>
<option value="ty">ty</option>
</select>
<select name="ItemToOrders[0][Qt]" id="s1" class="aa">
<option value="tt">tt</option>
<option value="tr">tr</option>
<option value="ty">ty</option>
</select>
<input name="ItemToOrders[0][Qt]" id="s1" class="aa">
</div>
</div>
$('body').on('change', 'select', function(){
$('option', $(this)).removeAttr('selected');
$('option:selected', $(this)).attr('selected', 'selected');
});
$(".tr").click(function () {
var s = $(".form-row").length;
let $self = $(".form-row").last().find(".aa");
let name = $self.attr('name');
let newName = name.replace(/(.*?\[)\d+(\].*)/i, '$1' + s + '$2');
$self.attr('name', newName) ;
$self.clone().attr('name', newName).appendTo('.on-mobile');
});
This Pen doesn't use any external CSS resources.