1var ModalPopup = ( function () { 2 3 var popup = function ( container, content, classname, opts ) { 4 var overlay = $( String() 5 + '<div id="modal-overlay" style="opacity: 0;">' 6 + ' <div id="modal-content" class="' + classname + '"></div>' 7 + ' <div id="modal-bg"></div>' 8 + '</div>' 9 ); 10 var innerContainer = overlay.find( '#modal-content' ); 11 innerContainer.append( $( '<a href="#" class="modal-cancel">Close</a>' ) ); 12 13 if ( typeof opts !== 'undefined' ) { 14 if ( 'containerEvents' in opts ) { 15 opts.containerEvents.forEach( function ( cevent ) { 16 container.on( cevent.event, cevent.selector, cevent.callback ); 17 } ); 18 } 19 } 20 21 innerContainer.append( content ); 22 container.on( 'click', '.modal-cancel, #modal-bg', function () { 23 container.find( '#modal-overlay' ).animate( { opacity: '0' }, 500, function () { 24 container.html( '' ); 25 } ); 26 return false; 27 } ); 28 container.append( overlay ) 29 container.find( '#modal-overlay' ).animate( { opacity: '1' }, 500 ); 30 }; 31 32 return { popup : popup }; 33} )();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.