1(function ($) { 2 "use strict"; 3 var AFTHRAMPES_JS = window.AFTHRAMPES_JS || {}; 4 5 // Function to preload and apply background images 6 AFTHRAMPES_JS.DataBackground = function () { 7 $(".data-bg").each(function () { 8 var $this = $(this); 9 var background = $this.data("background"); 10 11 if (background) { 12 // Preload the background image first 13 var img = new Image(); 14 img.src = background; 15 16 // When the image is loaded, apply it as the background 17 img.onload = function () { 18 $this.css("background-image", "url(" + background + ")"); 19 $this.addClass("data-bg-loaded"); 20 }; 21 } 22 }); 23 }; 24 25 // Preloader function to hide preloader after page load 26 AFTHRAMPES_JS.Preloader = function () { 27 $(window).on('load', function () { 28 $('#af-preloader').fadeOut('slow', function () { 29 $('#loader-wrapper').fadeOut(); 30 }); 31 }); 32 }; 33 34 // Document ready 35 $(document).ready(function () { 36 AFTHRAMPES_JS.DataBackground(); 37 AFTHRAMPES_JS.Preloader(); 38 }); 39 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.