I need some help with jquery if condition. I\'ve been searching and testing for hours, any help would be great !!! I get this HTML code:
try this:
$(function(){
$("input").change(function(){
if ( $(this).val() < 3 ) {
$('#select2').prop('disabled', true);
$('#select1').on("change",function() {
$('#select2').val($(this).val());
});
}else {
$("#select1").off();
$('#select1, #select2').prop('disabled', false);
}
});
});
Demo:http://jsfiddle.net/qhPp7/2/