Santa Fe Institute Collaboration Platform

Thermodynamics of Computation

Difference between revisions of "MediaWiki:Common.js"

From Thermodynamics of Computation
(Created page with "→‎Any JavaScript here will be loaded for all users on every page load.: $(function() { $('input[name="Reference Material Query ABC[index]"]').on('change', function() {...")
 
Line 1: Line 1:
 
/* Any JavaScript here will be loaded for all users on every page load. */
 
/* Any JavaScript here will be loaded for all users on every page load. */
  
$(function() {
+
function runQueryOnABCChange(){
   $('input[name="Reference Material Query ABC[index]"]').on('change', function() {
+
   $('input[name="Reference Material Query ABC[index]"], input[name="Reference Material Query [index]"]').each(function(){
    var $form = $(this).closest('form');
+
        $(this).on('change', function() {
    $form.find('input[type=submit]').click();
+
        var $form = $(this).closest('form');
 +
        $form.find('input[type=submit]').click();
 +
    });
 
   });
 
   });
});
+
}

Revision as of 11:09, November 30, 2018

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

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();
     });
  });
}