MCPcopy Create free account
hub / github.com/nwutils/nw-sample-apps / fixInput

Function fixInput

camera/jquery.js:5003–5014  ·  view source on GitHub ↗
( src, dest )

Source from the content-addressed store, hash-verified

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

Callers 1

jquery.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected