Difference between revisions of "MediaWiki:Common.js"
Mscottmoore (talk | contribs) m (Pinyin table testing) |
Mscottmoore (talk | contribs) m (Pinyin table testing) |
||
Line 4: | Line 4: | ||
$(document).ready( function() { | $(document).ready( function() { | ||
$('#table-settings').append('<input type="checkbox" id="table-toggle-ipa" value="true">'); | $('#table-settings').append('<input type="checkbox" id="table-toggle-ipa" value="true">'); | ||
+ | $('.table-ipa').hide(); | ||
$('.table-zhuyin').hide(); | $('.table-zhuyin').hide(); | ||
$('.table-wade-giles').hide(); | $('.table-wade-giles').hide(); | ||
− | $('#table-toggle-ipa'). | + | $('#table-toggle-ipa').click( function() { |
− | if ($(this). | + | if ($(this).prop('checked') { |
$('.table-ipa').show(); | $('.table-ipa').show(); | ||
} else { | } else { |
Revision as of 03:30, 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-ipa').hide();
$('.table-zhuyin').hide();
$('.table-wade-giles').hide();
$('#table-toggle-ipa').click( function() {
if ($(this).prop('checked') {
$('.table-ipa').show();
} else {
$('.table-ipa').hide();
};
});
});