$('.select2').select2(); code example

Example 1: select2

$('.js-example-basic-single').select2({
  placeholder: 'Select an option'
});

Example 2: select2 .select2-results .select2-highlighted

#menuOption1-container  .select2-results__option--highlighted {
    background-color: #50831F !important;
}

#menuOption2-container  .select2-results__option--highlighted {
   background-color: #28915F !important;
}

Example 3: select2 .select2-results .select2-highlighted

$(document).ready(function() {
    $("#menuOption1").select2({dropdownParent: "#menuOption1-container"});
    $("#menuOption2").select2({dropdownParent: "#menuOption2-container"});
});