I'm trying to integrate this javascript from the JSFiddle into the html page. The code might not be pretty ( and it's not ) but it does the trick :).
The problem is that the code works in JSFiddle but I cannot implement it in a single html document. This might be the stupidest question but I need help.
Here is the JSFiddle : http://jsfiddle.net/nhzr0kyb/
Javascript:
$('#never1').change(function () {
if ($(this).attr("checked")) {
$(this).siblings('#less1, #lunar1, #saptamanal1, #week11, #week12, #week13, #week14, #week15, #week16, #week17:checkbox').not(this).removeAttr('checked');
} else {
$('#less1, #lunar1, #saptamanal1').attr('disabled', false);
$('#week11, #week12, #week13, #week14, #week15, #week16, #week17').attr('disabled', true);
}
});
$('#less1').change(function () {
$(this).siblings('#week11, #week12, #week13, #week14, #week15, #week16, #week17:checkbox').not(this).removeAttr('checked');
});
$('#lunar1').change(function () {
$(this).siblings('#week11, #week12, #week13, #week14, #week15, #week16, #week17:checkbox').not(this).removeAttr('checked');
});
$('#saptamanal1').change(function () {
if ($(this).attr("checked")) {
$('#week11, #week12, #week13, #week14, #week15, #week16, #week17').attr('disabled', false);
} else {
$('#week11, #week12, #week13, #week14, #week15, #week16, #week17').attr('disabled', true);
}
});
$("#checkbox").prop("checked", false).click(function() {
$(this).siblings('#week11, #week12, #week13, #week14, #week15, #week16, #week17:checkbox').not(this).removeAttr('checked');
$('#week11, #week12, #week13, #week14, #week15, #week16, #week17').attr('disabled', true);
});
$(document).ready(function() {
$('.mutuallyexclusive').click(function () {
checkedState = $(this).attr('checked');
$('.mutuallyexclusive:checked').each(function () {
$(this).attr('checked', false);
});
$(this).attr('checked', checkedState);
$('#week11, #week12, #week13, #week14, #week15, #week16, #week17').attr('disabled', true);
});
});
$(document).ready(function() {
$('.checkbox1').click(function () {
checkedState = $(this).attr('checked');
$('.checkbox1:checked').each(function () {
$(this).attr('checked', false);
});
$(this).attr('checked', checkedState);
$('#week11, #week12, #week13, #week14, #week15, #week16, #week17').attr('disabled', true);
});
});
Thanks in advance, Iosif

$(document).ready(function() {...});and other is not?