/* Epilogue by TEMPLATED templated.co @templatedco Released for free under the Creative Commons Attribution 3.0 license (templated.co/license) 首页用的 */ (function($) { skel.breakpoints({ xlarge: '(max-width: 1680px)', large: '(max-width: 1280px)', medium: '(max-width: 980px)', small: '(max-width: 736px)', xsmall: '(max-width: 480px)', xxsmall: '(max-width: 360px)' }); $(function() { var $window = $(window), $body = $('body'); // Disable animations/transitions until the page has loaded. $body.addClass('is-loading'); $window.on('load', function() { window.setTimeout(function() { $body.removeClass('is-loading'); }, 100); }); // Fix: Placeholder polyfill. $('form').placeholder(); // Prioritize "important" elements on medium. skel.on('+medium -medium', function() { $.prioritize( '.important\\28 medium\\29', skel.breakpoint('medium').active ); }); // Items. $('.item').each(function() { var $this = $(this), $header = $this.find('header'), $a = $header.find('a'), $img = $header.find('img'); // Set background. $a.css('background-image', 'url(' + $img.attr('src') + ')'); // Remove original image. $img.remove(); }); }); })(jQuery);