Difference between revisions of "MediaWiki:Common.js"
From Thermodynamics of Computation
WikiWorks2 (talk | contribs) |
WikiWorks2 (talk | contribs) |
||
Line 3: | Line 3: | ||
$(document).ready(function() { | $(document).ready(function() { | ||
runQueryOnABCChange() | runQueryOnABCChange() | ||
− | $('.pseudo- | + | $('.pseudo-radiobutton input[checked="checked"]').parent().css('font-weight','bold').css('color','#36c'); |
}); | }); | ||
Revision as of 11:33, November 30, 2018
/* Any JavaScript here will be loaded for all users on every page load. */ $(document).ready(function() { runQueryOnABCChange() $('.pseudo-radiobutton input[checked="checked"]').parent().css('font-weight','bold').css('color','#36c'); }); 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(); }); }); }