MCPcopy Create free account
hub / github.com/apache/cloudstack / cloneCopyEvent

Function cloneCopyEvent

tools/ngui/static/js/lib/jquery-1.7.2.js:6099–6125  ·  view source on GitHub ↗
( src, dest )

Source from the content-addressed store, hash-verified

6097}
6098
6099function cloneCopyEvent( src, dest ) {
6100
6101 if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
6102 return;
6103 }
6104
6105 var type, i, l,
6106 oldData = jQuery._data( src ),
6107 curData = jQuery._data( dest, oldData ),
6108 events = oldData.events;
6109
6110 if ( events ) {
6111 delete curData.handle;
6112 curData.events = {};
6113
6114 for ( type in events ) {
6115 for ( i = 0, l = events[ type ].length; i < l; i++ ) {
6116 jQuery.event.add( dest, type, events[ type ][ i ] );
6117 }
6118 }
6119 }
6120
6121 // make the cloned public data object a copy from the original
6122 if ( curData.data ) {
6123 curData.data = jQuery.extend( {}, curData.data );
6124 }
6125}
6126
6127function cloneFixAttributes( src, dest ) {
6128 var nodeName;

Callers 1

jquery-1.7.2.jsFile · 0.85

Calls 3

hasDataMethod · 0.80
extendMethod · 0.80
addMethod · 0.65

Tested by

no test coverage detected