MediaWiki:Common.js: Difference between revisions

Content deleted Content added
use prop() instead of attr() for 'checked' - https://stackoverflow.com/questions/5874652/prop-vs-attr
remove otherVal support, superseded by preSelect
Line 303:
return amounts;
 
}
 
function adjustOtherVal() {
// prefill other amount box if param provided
var otherVal = mw.util.getParamValue( 'otherVal' );
if( isNaN( parseFloat( otherVal ) ) ) {
return;
}
otherVal = parseFloat( otherVal );
$("#input_amount_other").prop( 'checked', true );
$("#input_amount_other_box").val( otherVal );
}
 
Line 391 ⟶ 380:
try {
adjustHPC();
adjustOtherVal();
preSelect(); // Make sure to do this *after* other fiddling with values
}