1(function($) { 2 $(document).ready(function(){ 3 // Initialize slider conditionally, only on mobile. 4 pricing_table_lite_slider(); 5 function pricing_table_lite_slider() { 6 $('.wdm-pricing-section').each(function() { 7 var $carousel = $(this); 8 if ($(window).width() > 767) { 9 if ($carousel.hasClass('slick-initialized')) { 10 $carousel.slick('unslick'); 11 } 12 } else { 13 if (!$carousel.hasClass('slick-initialized')) { 14 var position = $('.ups-col.highlighted').data('highlight'); 15 $carousel.slick({ 16 centerMode: true, 17 centerPadding: '40px', 18 slidesToShow: 1, 19 infinite: false, 20 initialSlide: position, 21 adaptiveHeight: false, 22 mobileFirst: true, 23 focusOnSelect: false 24 }); 25 } 26 } 27 }); 28 } 29 30 $(window).on('resize orientationchange', function() { 31 pricing_table_lite_slider(); 32 }); 33 34 $(document).on('click', '.wdm-ps-annual', function() { 35 var parent = $(this).closest('.wdm-pricing-section-w'); // get parent element 36 var annual_elements = parent.find(".annual"); 37 var lifetime_elements = parent.find(".lifetime"); 38 var annual_btn = parent.find(".wdm-ps-annual"); 39 var lifetime_btn = parent.find(".wdm-ps-lifetime"); 40 41 $(lifetime_btn).removeClass("active"); // remove active class from lifetime button 42 $(annual_btn).addClass("active"); // add active class to annual button 43 $(lifetime_elements).removeClass("active"); // remove active class from lifetime element 44 $(annual_elements).addClass("active"); // add active class to annual element 45 }); 46 $(document).on('click', '.wdm-ps-lifetime', function() { 47 var parent = $(this).closest('.wdm-pricing-section-w'); // get parent element 48 var annual_elements = parent.find(".annual"); 49 var lifetime_elements = parent.find(".lifetime"); 50 var annual_btn = parent.find(".wdm-ps-annual"); 51 var lifetime_btn = parent.find(".wdm-ps-lifetime"); 52 53 $(annual_btn).removeClass("active"); // remove active class from annual button 54 $(lifetime_btn).addClass("active"); // add active class to lifetime button 55 $(annual_elements).removeClass("active"); // remove active class from annual element 56 $(lifetime_elements).addClass("active"); // add active class to lifetime element 57 }); 58 59 }); 60})(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.