Commit 700ad786 authored by greggles's avatar greggles

bug #802284 by ksenzee: javascript was broken and old style

parent eef554f2
// $Id$
if (Drupal.jsEnabled) {
$(document).ready(function() {
$("#edit-notify-type-1").bind("click", function() {
if ($("#edit-notify").attr("checked", false)) {
// Auto-notification not checked - do it for them.
$("#edit-notify").attr("checked",true);
}
});
$("#edit-notify-type-2").bind("click", function() {
if ($("#edit-notify").attr("checked", false)) {
// Auto-notification not checked - do it for them.
$("#edit-notify").attr("checked",true);
}
});
});
}
(function ($) {
Drupal.behaviors.commentNotify = {
attach: function (context) {
$('#edit-notify-type', context).hide();
$('#edit-notify', context).bind('change', function() {
if ($(this).attr('checked')) {
$('#edit-notify-type', context).show();
if ($('#edit-notify-type input:checked', context).length == 0) {
$('#edit-notify-type input', context)[0].checked = 'checked';
}
}
else {
$('#edit-notify-type', context).hide();
}
});
$('#edit-notify', context).trigger('change');
}
}
})(jQuery);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment