Santa Fe Institute Collaboration Platform

Thermodynamics of Computation

Difference between revisions of "MediaWiki:Common.js"

From Thermodynamics of Computation
 
(19 intermediate revisions by the same user not shown)
Line 3: Line 3:
 
$(document).ready(function() {
 
$(document).ready(function() {
 
     runQueryOnABCChange()
 
     runQueryOnABCChange()
    $('.pseudo-button input[checked="checked"]').parent().css('font-weight','bold').css('color','#36c');
 
 
});
 
});
  
Line 12: Line 11:
 
         $form.find('input[type=submit]').click();
 
         $form.find('input[type=submit]').click();
 
     });
 
     });
 +
    $('.radioButtonItem.pseudo-radiobutton input[checked="checked"]').parent().css('background', '#444').css('color', '#fff');
 
   });
 
   });
 
}
 
}

Latest revision as of 14:22, November 30, 2018

/* Any JavaScript here will be loaded for all users on every page load. */

$(document).ready(function() {
    runQueryOnABCChange()
});

function runQueryOnABCChange(){
  $('input[name="Reference Material Query ABC[index]"], input[name="Reference Material Query[index]"]').each(function(){
        $(this).on('change', function() {
        var $form = $(this).closest('form');
        $form.find('input[type=submit]').click();
     });
     $('.radioButtonItem.pseudo-radiobutton input[checked="checked"]').parent().css('background', '#444').css('color', '#fff');
  });
}