MCPcopy Create free account
hub / github.com/JsAaron/jQuery / fixInput

Function fixInput

2.1.1/test/other.js:2409–2420  ·  view source on GitHub ↗
( src, dest )

Source from the content-addressed store, hash-verified

2407
2408// Support: IE >= 9
2409function fixInput( src, dest ) {
2410 var nodeName = dest.nodeName.toLowerCase();
2411
2412 // Fails to persist the checked state of a cloned checkbox or radio button.
2413 if ( nodeName === "input" && rcheckableType.test( src.type ) ) {
2414 dest.checked = src.checked;
2415
2416 // Fails to return the selected option to the default selected state when cloning options
2417 } else if ( nodeName === "input" || nodeName === "textarea" ) {
2418 dest.defaultValue = src.defaultValue;
2419 }
2420}
2421
2422jQuery.extend({
2423 clone: function( elem, dataAndEvents, deepDataAndEvents ) {

Callers 1

other.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected