1var BMWPromoSlider = {}; 2 3(function ($) { 4 BMWPromoSlider = { 5 initSlider: function () { 6 console.log("showing bmw promo slider"); 7 var $selector = $("#vlp-promotions .inv-promotion-slider"); 8 // seo.js's _initSlider() (personalization-banner flow) is the "intended" place for 9 // this, but it doesn't run on every site/page, so this is in practice the only 10 // reliable initializer â apply the same ccps dots:false + "X of Y" pager here too, 11 // reusing PMSEO.setupCcpsSliderPager() instead of duplicating it. 12 var useCcpsPager = typeof pm_api !== 'undefined' && typeof PM_CCPS_DESIGN_SITES !== 'undefined' 13 && PM_CCPS_DESIGN_SITES.includes(pm_api.site_token); 14 15 var slickOptions = { 16 dots: !useCcpsPager, 17 autoplay: true, 18 infinite: true, 19 speed: 1500, 20 slidesToShow: 1, 21 slidesToScroll: 1, 22 lazyLoad: "ondemand", 23 fade: false, 24 }; 25 if (useCcpsPager) { 26 slickOptions.prevArrow = '<button type="button" class="slick-prev"><span></span></button>'; 27 slickOptions.nextArrow = '<button type="button" class="slick-next"><span></span></button>'; 28 // ccps slides no longer share a fixed height, so let slick size each slide to its 29 // own content and smoothly animate the height change between slides (uses the 30 // same speed as the slide transition above). 31 slickOptions.adaptiveHeight = true; 32 } 33 34 var wasAlreadyInitialized = $selector.hasClass("slick-initialized"); 35 $selector.not(".slick-initialized").slick(slickOptions); 36 37 if (useCcpsPager && $selector.length > 0 && !wasAlreadyInitialized && typeof PMSEO !== 'undefined' && PMSEO.setupCcpsSliderPager) { 38 PMSEO.setupCcpsSliderPager($("#vlp-promotions"), $selector); 39 } 40 41 $selector.show(); 42 }, 43 }; 44})(jQuery); 45 46jQuery(document).ready(function () { 47 BMWPromoSlider.initSlider(); 48});
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.