Jump to: navigation, search

Difference between revisions of "MediaWiki:Common.js"

m (Small bug fix)
m (Pinyin table testing)
Line 3: Line 3:
 
/*pinyin table scripts*/
 
/*pinyin table scripts*/
 
$(document).ready( function() {
 
$(document).ready( function() {
     $('#table-settings').append('<input type="checkbox" id="table-toggle-ipa" />');
+
     $('#table-settings').append('<input type="checkbox" id="table-toggle-ipa" value="true">');
 
     $('.table-zhuyin').hide();
 
     $('.table-zhuyin').hide();
 
     $('.table-wade-giles').hide();
 
     $('.table-wade-giles').hide();
  
 
     $('#table-toggle-ipa').change( function() {
 
     $('#table-toggle-ipa').change( function() {
         if (this.val()) {
+
         if ($(this).val()) {
 
             $('.table-ipa').show();
 
             $('.table-ipa').show();
 
         } else {
 
         } else {

Revision as of 03:23, 8 January 2015

/* Any JavaScript here will be loaded for all users on every page load. */
 
/*pinyin table scripts*/
$(document).ready( function() {
    $('#table-settings').append('<input type="checkbox" id="table-toggle-ipa" value="true">');
    $('.table-zhuyin').hide();
    $('.table-wade-giles').hide();
 
    $('#table-toggle-ipa').change( function() {
        if ($(this).val()) {
            $('.table-ipa').show();
        } else {
            $('.table-ipa').hide();
        };
    });
});