So I modified the condition and it works as it should, I hope that it will suit you.
var number1=$("#dropdown1").children(":checked").length,
number2=$("#dropdown2").children(":checked").length;
if (ui.checked && ((number1 + number2 >=4) || $(this).children(":checked").length >= 2)){
return false;
}
If you want to only two from both selects and modify the condition as follows:
var number1=$("#dropdown1").children(":checked").length,
number2=$("#dropdown2").children(":checked").length;
if (ui.checked && ((number1 + number2 >=2) || $(this).children(":checked").length >= 2)){
return false;
}
Adapted to the requirements in the comment
individual segments inserted into the div. Adjusted control function click
to:
$(this).parent("div").find("[id^=Main]:checked").each(function(){
$(this).nextAll('.holder:first').append('<div>'+ctrl+lbl+'</div>');
});