1jQuery(document).ready(function($){ 2 3 //slider home popular 4 if( $('.popular').length ) { 5 $('.popular').slick({ 6 autoplay: true, 7 slidesToShow: 4, 8 slidesToScroll: 1, 9 responsive: [ 10 { 11 breakpoint: 850, 12 settings: { 13 slidesToShow: 3, 14 } 15 }, 16 { 17 breakpoint: 700, 18 settings: { 19 slidesToShow: 2, 20 } 21 }, 22 { 23 breakpoint: 480, 24 settings: { 25 slidesToShow: 1, 26 adaptiveHeight: true, 27 } 28 } 29 ] 30 }); 31 } 32 33 //slider home test 34 if( $('.test-posts').length ) { 35 $('.test-posts').slick({ 36 autoplay: true, 37 adaptiveHeight: true, 38 }); 39 } 40 41 //slider question popular 42 if( $('.popular-question').length ) { 43 $('.popular-question').slick({ 44 autoplay: true, 45 slidesToShow: 3, 46 slidesToScroll: 1, 47 responsive: [ 48 { 49 breakpoint: 850, 50 settings: { 51 slidesToShow: 3, 52 } 53 }, 54 { 55 breakpoint: 600, 56 settings: { 57 slidesToShow: 2, 58 } 59 }, 60 { 61 breakpoint: 480, 62 settings: { 63 slidesToShow: 1, 64 adaptiveHeight: true, 65 } 66 } 67 ] 68 }); 69 } 70 71 //mobile navigation 72 $('body .main').prepend('<div class="menu-overlay">ÐакÑÑÑÑ Ð¼ÐµÐ½Ñ</div>'); 73 $('.nav-open').click(function() { 74 $('body').addClass('js-nav'); 75 $('.nav-close').addClass('active'); 76 $(this).addClass('active'); 77 morkovinDisableScrollMenu('.m-nav__inner', '.main'); 78 }); 79 $('.nav-close').click(function() { 80 $('body').removeClass('js-nav'); 81 $('.nav-open').removeClass('active'); 82 $(this).removeClass('active'); 83 morkovinDisableScrollMenu('.m-nav__inner', '.main', false); 84 }); 85 $('.menu-overlay').click(function() { 86 $('body').removeClass('js-nav'); 87 $('.nav-open').removeClass('active'); 88 $('.nav-close').removeClass('active'); 89 morkovinDisableScrollMenu('.m-nav__inner', '.main', false); 90 }); 91 92 //Attribute start ol 93 $('ol[start]').each(function() { 94 var val = parseFloat($(this).attr("start")) - 1; 95 $(this).css('counter-increment','li '+ val); 96 }); 97 98 //add scroll for tables on mobile versions 99 $('.single table').wrap('<div class="table-box"></div>'); 100 101 //Arrow up 102 $('<div id="up" class="up" style="display: none">навеÑÑ </div>').appendTo('.footer .wrap').click(function() { 103 $('html, body').animate({scrollTop: 0}, 700); 104 }); 105 var win = $(window); 106 var up = $('#up'); 107 win.on('scroll', function() { 108 if ( win.scrollTop() > win.height() / 3 ) { 109 up.fadeIn(); 110 } else { 111 up.fadeOut(); 112 } 113 }).scroll(); 114 115 //Remove button load more 116 $(document).ajaxComplete(function() { 117 $('.last_item').next('.more-box').remove(); 118 }); 119 120 //pagination 121 if ($('.more').length) { 122 $('body').on('click', '.more:not(.loading)', function() { 123 var more = $(this); 124 var container = $(this).parent().prev('.ajax_pagination'); 125 var defaultText = more.html(); 126 more.addClass('loading').html( more.data('loading') ); 127 var offset = more.data('offset'); 128 var items = more.data('items'); 129 var theme = more.data('theme'); 130 var newposts = ''; 131 var tax = ''; 132 var tag = ''; 133 var search = ''; 134 var test = ''; 135 var video = ''; 136 var question = ''; 137 138 if ( more.data('newposts') ) newposts = '&newposts=' + more.data('newposts'); 139 if ( more.data('category') ) tax = '&category=' + more.data('category'); 140 if ( more.data('tag') ) tag = '&tag=' + more.data('tag'); 141 if ( more.data('search') ) search = '&search=' + more.data('search'); 142 if ( more.data('test') ) test = '&test=' + more.data('test'); 143 if ( more.data('video') ) video = '&video=' + more.data('video'); 144 if ( more.data('question') ) question = '&question=' + more.data('question'); 145 146 $.ajax({ 147 url: '/wp-content/themes/' + theme + '/ajax-posts.php?offset=' + offset + '&items=' + items + newposts + tax + tag + search + test + video + question 148 }).done(function(html) { 149 container.after(html); 150 more.data('offset', offset + items).removeClass('loading').html(defaultText); 151 if ($.trim(html) === '') { 152 more.remove(); 153 } else { 154 $('html, body').animate({scrollTop: $('.ajax_pagination:last').offset().top -100 }, 900); 155 } 156 }); 157 }); 158 } 159 160 //mobole navigation 161 function morkovinDisableScrollMenu( mobileMenuWrapp, contentWrapp, disableScroll ) { 162 if (disableScroll === undefined) { 163 disableScroll = true; 164 } 165 166 if ( $('#block-after-menu').length ){ 167 $('#block-after-menu').remove(); 168 } 169 170 if (disableScroll) { 171 var offsetBottomMenu; 172 var winHeight = $(window).height(); 173 174 $(mobileMenuWrapp).after('<div style="text-indent: -9999px; width: 1px; height: 1px;" id="block-after-menu">ÐÐ¾Ð½ÐµÑ Ð¼ÐµÐ½Ñ</div>'); 175 offsetBottomMenu = $('#block-after-menu').offset().top; 176 177 if (winHeight > offsetBottomMenu) { 178 $(contentWrapp).height(winHeight); 179 } else { 180 $(contentWrapp).height(offsetBottomMenu); 181 } 182 $(contentWrapp).css('overflow', 'hidden'); 183 } else { 184 $(contentWrapp).css('overflow', 'hidden'); 185 $(contentWrapp).css("height", "auto"); 186 } 187 } 188 189});
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.