MediaWiki:Newarticleassistant-formscript: Difference between revisions

From Bulbanews, your community Pokémon newspaper.
Jump to navigationJump to search
m (Created page with "→‎<code>: $(document).ready(function() { $('#bnSourcetype').change(function() { $sourceType = $(this).val(); if ($sourceType == 'exclusive' || $sourceType == 'none') { ...")
 
mNo edit summary
Line 1: Line 1:
/* <code> */
/* <pre> */
$(document).ready(function() {
$(document).ready(function() {
$('#bnSourcetype').change(function() {
$('#bnSourcetype').change(function() {
$sourceType = $(this).val();
$sourceType = $(this).val();
if ($sourceType == 'exclusive' || $sourceType == 'none') {
if ($sourceType == 'exclusive' || $sourceType == 'none') {
$('#bnSourcename').closest('tr').hide('blind');
$('#bnSourcename').attr('disabled', true).fadeTo('fast', 0.5);
$('#bnSourcelink').closest('tr').hide('blind');
$('#bnSourcelink').attr('disabled', true).fadeTo('fast', 0.5);
} else {
} else {
$('#bnSourcename').closest('tr').show('blind');
$('#bnSourcename').removeAttr('disabled').fadeTo('fast', 1.0);
$('#bnSourcelink').closest('tr').show('blind');
$('#bnSourcelink').removeAttr('disabled').fadeTo('fast', 1.0);
}
}
});
});
});
});
/* </code> */
/* </pre> */

Revision as of 02:11, 19 August 2011

/*

 */
$(document).ready(function() {
	$('#bnSourcetype').change(function() {
		$sourceType = $(this).val();
		if ($sourceType == 'exclusive' || $sourceType == 'none') {
			$('#bnSourcename').attr('disabled', true).fadeTo('fast', 0.5);
			$('#bnSourcelink').attr('disabled', true).fadeTo('fast', 0.5);
		} else {
			$('#bnSourcename').removeAttr('disabled').fadeTo('fast', 1.0);
			$('#bnSourcelink').removeAttr('disabled').fadeTo('fast', 1.0);
		}
	});
});
/* 

*/