1jQuery(document).ready(function($) { 2 // Run this function for each .oht-extra-wide-slider. 3 $('.oht-extra-wide-slider').each(function() { 4 var slider = $(this); // The individual .oht-extra-wide-slider 5 var slider_arrow = slider.find('.indicator-arrows'); // The arrow for this slider 6 7 slider.on('slid.bs.carousel', function() { 8 var first_offset = Math.abs(slider.find('.carousel-indicators li:first-child').offset().left - slider.offset().left); 9 var active = $(this).find('.carousel-item.active'); 10 var prev = active.prev(); 11 12 var active_offset = Math.abs(slider.find('.carousel-indicators .active').offset().left - slider.offset().left - first_offset); 13 console.log('active_offset: ' + active_offset) 14 15 if(active.index() == 0){ 16 previous_index = 0; 17 } 18 19 if (prev.length == 0) { 20 $previous_index = 0; 21 console.log('set margin 92px') 22 slider_arrow.css('margin-left', '92px'); 23 return; 24 } 25 26 var new_margin = active_offset + 92; 27 slider_arrow.css('margin-left'); 28 slider_arrow.css('margin-left', new_margin + 'px'); 29 }); 30 }); 31 $(window).on('load resize', function() { 32 var windowWidth = $(window).width(); 33 if (windowWidth < 900) { 34 $('.carousel-indicators li').each(function() { 35 // Get the href attribute of the .read-more-wide-slider link 36 var newHref = $(this).find('.read-more-wide-slider').attr('href'); 37 38 // Attach a click event to the li that navigates to the new URL 39 $(this).off('click').on('click', function() { 40 window.location.href = newHref; 41 }); 42 }); 43 } 44 }); 45 //on .read-more-wide-slider click, navigate to the href of .read-more-wide-slider 46 $('.read-more-wide-slider').on('click', function() { 47 console.log('read-more-wide-slider click') 48 window.location.href = $(this).attr('href'); 49 }); 50}); 51
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.