Открыть главное меню
 
(не показана 1 промежуточная версия этого же участника)
Строка 1: Строка 1:
 
/* Any JavaScript here will be loaded for users using the mobile site */
 
/* Any JavaScript here will be loaded for users using the mobile site */
 +
 +
var btn = $('#button');
  
 
/* Yandex Metrika */
 
/* Yandex Metrika */
Строка 19: Строка 21:
 
   gtag('config', 'UA-100709782-2');
 
   gtag('config', 'UA-100709782-2');
 
/* Google Analytics */
 
/* Google Analytics */
 
var btn = $('#button');
 
  
 
$(window).scroll(function() {
 
$(window).scroll(function() {

Текущая версия на 14:49, 17 мая 2021

/* Any JavaScript here will be loaded for users using the mobile site */

var btn = $('#button');

/* Yandex Metrika */
   (function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};
   m[i].l=1*new Date();k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)})
   (window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym");

   ym(56096482, "init", {
        clickmap:true,
        trackLinks:true,
        accurateTrackBounce:true
   });
/* Yandex Metrika */

/* Google Analytics */
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-100709782-2');
/* Google Analytics */

$(window).scroll(function() {
  if ($(window).scrollTop() > 300) {
    btn.addClass('show');
  } else {
    btn.removeClass('show');
  }
});

btn.on('click', function(e) {
  e.preventDefault();
  $('html, body').animate({scrollTop:0}, '300');
});