1/* 2 Snapshot by TEMPLATED 3 templated.co @templatedco 4 Released for free under the Creative Commons Attribution 3.0 license (templated.co/license) 5*/ 6 7(function($) { 8 9 skel.breakpoints({ 10 xlarge: '(max-width: 1680px)', 11 large: '(max-width: 1280px)', 12 medium: '(max-width: 980px)', 13 small: '(max-width: 736px)', 14 xsmall: '(max-width: 480px)' 15 }); 16 17 $(function() { 18 19 var $window = $(window), 20 $body = $('body'); 21 22 // Disable animations/transitions until the page has loaded. 23 $body.addClass('is-loading'); 24 25 $window.on('load', function() { 26 window.setTimeout(function() { 27 $body.removeClass('is-loading'); 28 }, 100); 29 }); 30 31 // Fix: Placeholder polyfill. 32 $('form').placeholder(); 33 34 // Prioritize "important" elements on medium. 35 skel.on('+medium -medium', function() { 36 $.prioritize( 37 '.important\\28 medium\\29', 38 skel.breakpoint('medium').active 39 ); 40 }); 41 42 // Scrolly. 43 $('.scrolly').scrolly(); 44 45 // Gallery. 46 $('.gallery').each(function() { 47 48 var $gallery = $(this), 49 $content = $gallery.find('.content'); 50 51 // Poptrox - shows caption under popped up image. 52 $content.poptrox({ 53 usePopupCaption: true 54 }); 55 56 // Tabs. 57 $gallery.each( function() { 58 59 var $this = $(this), 60 $tabs = $this.find('.tabs a'), 61 $media = $this.find('.media'); 62 63 $tabs.on('click', function(e) { 64 65 var $this = $(this), 66 tag = $this.data('tag'); 67 68 // Prevent default. 69 e.preventDefault(); 70 71 // Remove active class from all tabs. 72 $tabs.removeClass('active'); 73 74 // Reapply active class to current tab. 75 $this.addClass('active'); 76 77 // Hide media that do not have the same class as the clicked tab. 78 $media 79 .fadeOut('fast') 80 .each(function() { 81 82 var $this = $(this); 83 84 if ($this.hasClass(tag)) 85 $this 86 .fadeOut('fast') 87 .delay(200) 88 .queue(function(next) { 89 $this.fadeIn(); 90 next(); 91 }); 92 93 }); 94 95 }); 96 97 }); 98 99 100 }); 101 102 }); 103 104})(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.