[damned-lies] Retrieving properties by prop() instead of attr()



commit 1cc2f4f84d41c295c6260e1d71aecc53ecddce76
Author: Tom Tryfonidis <tomtryf gmail com>
Date:   Thu May 12 11:07:26 2016 +0200

    Retrieving properties by prop() instead of attr()
    
    prop() has been introduced in jQuery 1.6.

 templates/vertimus/vertimus_detail.html |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/templates/vertimus/vertimus_detail.html b/templates/vertimus/vertimus_detail.html
index f036e32..b19d88a 100644
--- a/templates/vertimus/vertimus_detail.html
+++ b/templates/vertimus/vertimus_detail.html
@@ -14,10 +14,10 @@ tr.tr_author, tr.tr_sync_master { display: none; }
 $(document).ready(function() {
     autosize(document.querySelector('#id_comment'));
     if(typeof send_mail_defaults != 'undefined') {
-      $("#id_send_to_ml").attr('checked', send_mail_defaults[$("#id_action").val()]);
+      $("#id_send_to_ml").prop('checked', send_mail_defaults[$("#id_action").val()]);
       $("#id_action").change(function () {
         var value = $(this).val();
-        $("#id_send_to_ml").attr('checked', send_mail_defaults[value]);
+        $("#id_send_to_ml").prop('checked', send_mail_defaults[value]);
         $("tr.tr_author").toggle(value == 'CI');
         $("tr.tr_sync_master").toggle(value == 'CI');
         $("tr.tr_file").toggle(value != 'CI');


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]