JSFiddle - React, Tailwind, and code Playground
HTML
<select class='sel1'>
<option>a</option>
<option>b</option>
<option>c</option>
</select><select class='sel2'>
<option>test one</option>
<option>test two</option>
<option>test three</option>
</select>
JavaScript
$(document).ready(function() {
// This code just makes it encoded
$('select.sel2').find('option').each(function() {
$(this).html(encodeURIComponent($(this).html()));
});
// This is what you want
$('select.sel2').change(function() {
var $this = $(this);
$this.find('option:selected').html(decodeURIComponent($this.find('option:selected').html())).appendTo('select.sel1'); // append selected option to sibling
});
});