| 1 | (function( jQuery ) { |
| 2 | |
| 3 | function handleQueueMarkDefer( elem, type, src ) { |
| 4 | var deferDataKey = type + "defer", |
| 5 | queueDataKey = type + "queue", |
| 6 | markDataKey = type + "mark", |
| 7 | defer = jQuery._data( elem, deferDataKey ); |
| 8 | if ( defer && |
| 9 | ( src === "queue" || !jQuery._data(elem, queueDataKey) ) && |
| 10 | ( src === "mark" || !jQuery._data(elem, markDataKey) ) ) { |
| 11 | // Give room for hard-coded callbacks to fire first |
| 12 | // and eventually mark/queue something else on the element |
| 13 | setTimeout( function() { |
| 14 | if ( !jQuery._data( elem, queueDataKey ) && |
| 15 | !jQuery._data( elem, markDataKey ) ) { |
| 16 | jQuery.removeData( elem, deferDataKey, true ); |
| 17 | defer.fire(); |
| 18 | } |
| 19 | }, 0 ); |
| 20 | } |
| 21 | } |
| 22 | |
| 23 | jQuery.extend({ |
| 24 | |