]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - js/emailsettings.js
Start working a bit more consistently with "notice-options"
[quix0rs-gnu-social.git] / js / emailsettings.js
index c7f85fe9aec2b9ba3d1e19411449488094bd937d..f287c2d711104fc3f05fd8cd09ed3bcec5349edb 100644 (file)
@@ -1,16 +1,16 @@
 $(function() {
 
 function toggleIncomingOptions() {
-    var enabled = $('#emailpost').attr('checked');
+    var enabled = $('#emailpost').prop('checked', true);
     if (enabled) {
         // Note: button style currently does not respond to disabled in our main themes.
         // Graying out the whole section with a 50% transparency will do for now. :)
         // @todo: add a general 'disabled' class style to the base themes.
-        $('#emailincoming').removeAttr('style')
-                           .find('input').removeAttr('disabled');
+        $('#emailincoming').css('opacity', '')
+                           .find('input').prop('disabled', false);
     } else {
-        $('#emailincoming').attr('style', 'opacity: 0.5')
-                           .find('input').attr('disabled', 'disabled');
+        $('#emailincoming').css('opacity', '0.5')
+                           .find('input').prop('disabled', true);
     }
 }