1(function ($) { //an IIFE so safely alias jQuery to $ 2 $.PropertiesSlider = function (element) { 3 4 //stores the passed element as a property of the created instance. 5 6 if (element instanceof $) { 7 this.element = element 8 } else { 9 this.element = $(element); 10 this.elementSelector = element; 11 } 12 }; 13 14 //assigning an object literal to the prototype is a shorter syntax 15 //than assigning one property at a time 16 $.PropertiesSlider.prototype = { 17 Init: function () { 18 if (this.element.length == 0) { return; } 19 var swiper = new Swiper(this.elementSelector, $.PropertiesSlider.defaultOptions); 20 } 21 }; 22 23 $.PropertiesSlider.defaultOptions = { 24 loop: false, 25 slidesPerView: 1, 26 autoplay: true, 27 autoplay: { 28 delay: 5000, 29 disableOnInteraction: false 30 }, 31 speed: 1000, 32 pagination: { 33 el: ".property-pagination", 34 clickable: true 35 }, 36 navigation: { 37 nextEl: ".swiper-button-next", 38 prevEl: ".swiper-button-prev" 39 } 40 }; 41 42}(jQuery)); 43 44var propertiesSlider = new $.PropertiesSlider(".swiper-properties"); 45propertiesSlider.Init(); 46 47
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.