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

Function fixInput

2.1.1/test/jquery-2.1.1.js:5002–5013  ·  view source on GitHub ↗
( src, dest )

Source from the content-addressed store, hash-verified

5000
5001// Support: IE >= 9
5002function fixInput( src, dest ) {
5003 var nodeName = dest.nodeName.toLowerCase();
5004
5005 // Fails to persist the checked state of a cloned checkbox or radio button.
5006 if ( nodeName === "input" && rcheckableType.test( src.type ) ) {
5007 dest.checked = src.checked;
5008
5009 // Fails to return the selected option to the default selected state when cloning options
5010 } else if ( nodeName === "input" || nodeName === "textarea" ) {
5011 dest.defaultValue = src.defaultValue;
5012 }
5013}
5014
5015jQuery.extend({
5016 clone: function( elem, dataAndEvents, deepDataAndEvents ) {

Callers 1

jquery-2.1.1.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected