I have 3 select boxes and all are having same value (clones) & created on change of reference table selection. now i want to manage the selection on the three Constraint d
If I understand you correctly, you have elements with the same value in each
and you want to disable selection in the each of the other
elements when one of the
elements is selected. Here's a small snippet showing how I did that:
HTML
jQuery
$(document).ready(function () {
$('select.hello').change(function () {
$('select.hello option').attr('disabled', false);
$('select.hello').each(function() {
var val = $(this).find('option:selected').val();
if (!val) return;
$('select.hello option').filter(function() {
return $(this).val() == val;
}).attr('disabled', 'disabled');
});
});
});
And here is a link to the jsFiddle: http://jsfiddle.net/yLCVf/1/