1; (function ($) { 2 'use strict'; 3 4 jQuery(document).ready(function($) { 5 // Select the section 6 // var section = $('.bafg-twentytwenty-container'); 7 // console.log(section); 8 // section.each(function(){ 9 // var imageHeight = $(this).find('img:first').prop('naturalHeight'); 10 // var imageWidth = $(this).find('img:first').prop('naturalWidth'); 11 // // $(this).css('height',imageHeight) 12 // // console.log(imageWidth); 13 // $(this).css('height',imageHeight+'px'); 14 // $(this).css('width',imageWidth+'px'); 15 16 17 // }); 18 19 }); 20 // Hide the preloader once the page has loaded 21 // jQuery(window).on('load', function() { 22 // var section = jQuery('.bafg-preloader'); 23 // section.hide(); 24 // }); 25 $(window).on('load', function () { 26 $(".bafg-twentytwenty-container").each(function () { 27 if ($(this).attr('bafg-move-slider-on-hover') == 'no') { 28 var moveSliderHover = false; 29 } else { 30 var moveSliderHover = true; 31 } 32 33 if ($(this).attr('bafg-overlay') == 'yes') { 34 var overlay = false; 35 } else { 36 var overlay = true; 37 } 38 39 if ($(this).attr('bafg-click-to-move') == 'no') { 40 var clickToMove = false; 41 } else { 42 var clickToMove = true; 43 } 44 45 46 // $(this).find('img').css('min-width',imageWidth+'px'); 47 // console.log($(this).find('img')); 48 // $(this).css('height',imageHeight+'px'); 49 // $(this).css('width',imageWidth+'px'); 50 51 52 $(this).twentytwenty({ 53 orientation: $(this).attr('bafg-orientation'), 54 default_offset_pct: $(this).attr('bafg-default-offset'), 55 before_label: $(this).attr('bafg-before-label'), 56 after_label: $(this).attr('bafg-after-label'), 57 no_overlay: overlay, 58 move_slider_on_hover: moveSliderHover, 59 click_to_move: clickToMove 60 }); 61 62 63 64 //Label OutSide 65 var bafgLabelOutside = $(this).data('label_outside'); 66 var orientation = $(this).attr('bafg-orientation'); 67 if (bafgLabelOutside == true && orientation == 'vertical') { 68 $('.bafg-outside-label-wrapper.twentytwenty-vertical .bafg-twentytwenty-container').css('margin', 50 + 'px' + ' auto'); 69 70 $('.bafg-outside-label-wrapper.twentytwenty-vertical .twentytwenty-overlay>.twentytwenty-before-label').css('display', 'none'); 71 $('.bafg-outside-label-wrapper.twentytwenty-vertical .twentytwenty-overlay .twentytwenty-after-label').css('display', 'none'); 72 } 73 74 $(window).trigger("resize.twentytwenty"); 75 }); 76 77 }); 78 79 $(window).on('scroll', function () { 80 $(window).trigger("resize.twentytwenty"); 81 }); 82 $(document).on('load', function () { 83 $(document).trigger("resize.twentytwenty"); 84 }); 85 86})(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.