1( function( $ ) { 2 // Responsive videos 3 var all_videos = $( '.entry-content' ).find( 'iframe[src*="player.vimeo.com"], iframe[src*="youtube.com"], iframe[src*="youtube-nocookie.com"], iframe[src*="dailymotion.com"],iframe[src*="kickstarter.com"][src*="video.html"], object, embed' ); 4 5 all_videos = all_videos.not( 'object object' ); 6 7 all_videos.each( function() { 8 var video = $(this); 9 10 if ( video.parents( 'object' ).length ) 11 return; 12 13 if ( ! video.prop( 'id' ) ) 14 video.attr( 'id', 'rvw' + Math.floor( Math.random() * 999999 ) ); 15 16 video 17 .wrap( '<div class="responsive-video-wrapper" style="padding-top: ' + ( video.attr( 'height' ) / video.attr( 'width' ) * 100 ) + '%" />' ) 18 .removeAttr( 'height' ) 19 .removeAttr( 'width' ); 20 } ); 21 22 // Mobile menu 23 $( '#header' ).on( 'click', '#mobile-menu a', function() { 24 if ( $(this).hasClass( 'left-menu' ) ) 25 $( '#nav-wrapper' ).toggleClass( 'menu-open' ); 26 else 27 $( '#drop-down-search' ).slideToggle( 'fast' ); 28 } ); 29 30 // Open submenus in mobile menu 31 $( '#nav-wrapper' ).on( 'click', '.sub-menu-parent > a', function(e) { 32 e.preventDefault(); 33 34 if ( $(this).parents( '#nav-wrapper' ).hasClass( 'menu-open' ) ) 35 $(this).toggleClass( 'open' ).parent().find( '.sub-menu:first' ).toggle(); 36 } ); 37 38 // Image anchor 39 $( 'a:has(img)' ).addClass( 'image-anchor' ); 40} )( jQuery );
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.