MCPcopy Index your code
hub / github.com/JsAaron/jQuery / cloneCopyEvent

Function cloneCopyEvent

1.7/manipulation.js:372–398  ·  view source on GitHub ↗
( src, dest )

Source from the content-addressed store, hash-verified

370}
371
372function cloneCopyEvent( src, dest ) {
373
374 if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
375 return;
376 }
377
378 var type, i, l,
379 oldData = jQuery._data( src ),
380 curData = jQuery._data( dest, oldData ),
381 events = oldData.events;
382
383 if ( events ) {
384 delete curData.handle;
385 curData.events = {};
386
387 for ( type in events ) {
388 for ( i = 0, l = events[ type ].length; i < l; i++ ) {
389 jQuery.event.add( dest, type + ( events[ type ][ i ].namespace ? "." : "" ) + events[ type ][ i ].namespace, events[ type ][ i ], events[ type ][ i ].data );
390 }
391 }
392 }
393
394 // make the cloned public data object a copy from the original
395 if ( curData.data ) {
396 curData.data = jQuery.extend( {}, curData.data );
397 }
398}
399
400function cloneFixAttributes( src, dest ) {
401 var nodeName;

Callers 1

manipulation.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected