1 jQuery(function($) { 2 $('.plane-slider__items').slick({ 3 slidesToShow: 1, 4 slidesToScroll: 1, 5 arrows: false, 6 asNavFor: '.plane-slider-preview' 7 }); 8 9 $('.plane-slider-preview').slick({ 10 slidesToShow: 3, 11 slidesToScroll: 1, 12 asNavFor: '.plane-slider__items', 13 centerMode: true, 14 focusOnSelect: true, 15 responsive: [ 16 { 17 breakpoint: 576, 18 settings: { 19 slidesToShow: 1, 20 } 21 } 22 ] 23 }); 24 25 $('.plane-slider .plane-silder__control-prev').on('click', function () { 26 $('.plane-slider__items').slick('slickPrev'); 27 }); 28 29 $('.plane-slider .plane-silder__control-next').on('click', function () { 30 $('.plane-slider__items').slick('slickNext'); 31 }); 32 33 var url = new URL(location.href); 34 var currentPlaneId = url.searchParams.get("plane"); 35 36 if (currentPlaneId) { 37 $('html, body').animate({ 38 scrollTop: $('.content').offset().top 39 }, 1000); 40 } 41 42 var currentPlaneIndex = 0; 43 44 $('.plane-slider__items').slick('getSlick')['$slides'].each(function(index, item) { 45 console.log(currentPlaneId); 46 console.log(item); 47 if (item.id == currentPlaneId) { 48 currentPlaneIndex = index; 49 return false; 50 } 51 }); 52 53 $('.plane-slider__items').slick('getSlick').slickGoTo(currentPlaneIndex); 54 55 $('.plane-slider__tabs-title-item').on('click', function () { 56 var parent = $(this).parents('.plane-slider__tabs'); 57 parent.find('.plane-slider__tabs-title-item').removeClass('plane-slider__tabs-title-item_active') 58 parent.find('.plane-slider__tabs-item').removeClass('plane-slider__tabs-item_active') 59 $(this).addClass('plane-slider__tabs-title-item_active'); 60 parent.find('.plane-slider__tabs-item').eq($(this).index()).addClass('plane-slider__tabs-item_active') 61 }); 62 63 $('.plane-main-image__point').click(function(e) { 64 var currentIndex = $(this).index(); 65 var currentDescription = $('.slick-current .tooltipsDescr').find('.plane-main-image__point-description').eq(currentIndex); 66 var hasOpenClass = currentDescription.hasClass('plane-main-image__point-description_show'); 67 68 $('.slick-current .tooltipsDescr').find('.plane-main-image__point-description').removeClass('plane-main-image__point-description_show'); 69 70 if (hasOpenClass) { 71 currentDescription.removeClass('plane-main-image__point-description_show'); 72 } else { 73 currentDescription.addClass('plane-main-image__point-description_show'); 74 } 75 76 // var currentDescription = $(this).find('.plane-main-image__description'); 77 78 // if (currentDescription.is(':visible')) { 79 // currentDescription.hide(); 80 // } else { 81 // $('.plane-main-image__image .plane-main-image__description').hide(); 82 // currentDescription.show(); 83 // } 84 }); 85})
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.