a me serviva qualcosa simile a questo:
codice HTML:
$('select[name*="homepage_select"]').change(function(){
// start by setting everything to enabled
$('select[name*="homepage_select"] option').attr('disabled',false);
// loop each select and set the selected value to disabled in all other selects
$('select[name*="homepage_select"]').each(function(){
var $this = $(this);
$('select[name*="homepage_select"]').not($this).find('option').each(function(){
if($(this).attr('value') == $this.val())
$(this).attr('disabled',true);
});
});
});
In questo caso sui select homepage_select disabilita quelli già selezionati negli altri, a me servirebbe invece con i numeri se i prodotti sono 5 e ne seleziono 3 dal primo select, nel secondo select mi disabilita 3 4 5, quindi posso selezionare solo altri due