MCPcopy Create free account
hub / github.com/frank-lam/fullstack-tutorial / fixInput

Function fixInput

notes/docsify/unpkg/gotop/jquery-2.1.0.js:4957–4968  ·  view source on GitHub ↗
( src, dest )

Source from the content-addressed store, hash-verified

4955
4956// Support: IE >= 9
4957function fixInput( src, dest ) {
4958 var nodeName = dest.nodeName.toLowerCase();
4959
4960 // Fails to persist the checked state of a cloned checkbox or radio button.
4961 if ( nodeName === "input" && rcheckableType.test( src.type ) ) {
4962 dest.checked = src.checked;
4963
4964 // Fails to return the selected option to the default selected state when cloning options
4965 } else if ( nodeName === "input" || nodeName === "textarea" ) {
4966 dest.defaultValue = src.defaultValue;
4967 }
4968}
4969
4970jQuery.extend({
4971 clone: function( elem, dataAndEvents, deepDataAndEvents ) {

Callers 1

jquery-2.1.0.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected