• Как сделать дату на PHP +1 к месяцу?

    @g3rmes
    $datep = date("Y-m-d H:s:s");
    $timestamp = strtotime($datep);
    $timestamp2 = strtotime($datep . ' +1 month');
    
    var_dump(date('Y-m-d H:m:s', $timestamp));
    var_dump(date('Y-m-d H:m:s', $timestamp2));
    Ответ написан
  • При запуске gulp не отображаются local, external адреса. Что делать?

    @g3rmes Автор вопроса
    разобрался, при запуске из консоли, а ни из powershell окна, все отображается
    Ответ написан
    Комментировать
  • Как анимировать селектор меню при скролле?

    @g3rmes Автор вопроса
    Уже все решил, кому интересно, вот:
    $(function() {
    
    	// Липкая шапка, анимация home-кнопки
    
    	$(window).on('scroll', (function() {
    		if ($(this).scrollTop() > 299) {
    			$('.navigation').addClass("navigation-fixed");
    			$('#block1').css("margin-top", "50px");
    			$('.navigation-pos').addClass("navigation-pos-animate");
    			$('.fa-home').addClass('fa-home-visible');
    			$('.nav-button-selected').addClass('nav-button-selected-visible');
    			$('.inner-navigation-pos').addClass('inner-navigation-pos-animate');
    		} else {
    			$('.navigation').removeClass("navigation-fixed");
    			$('#block1').css("margin-top", "0px");
    			$('.navigation-pos').removeClass("navigation-pos-animate");
    			$('.fa-home').removeClass('fa-home-visible');
    			$('.nav-button-selected').removeClass('nav-button-selected-visible');
    			$('.inner-navigation-pos').removeClass('inner-navigation-pos-animate');
    		}
    	}));
    
    	$(document).on("scroll", onScroll);
    
    	// Анимация скролла при клике на пункт меню
    	var lastactive;
    
    	$('.navigation-pos').on('click', 'a', function (e) {
    
    		e.preventDefault();
    
    		$(document).off("scroll");
    		$('a').each(function () {
    			$(this).removeClass('active');
    		});
    		$(this).addClass('active');
    
    		var left = $(this).position().left,
    		width = $(this).width();
    		$( ".nav-button-selected-visible" ).animate({
    			width: width + 'px',
    			left: left + 'px'
    		}, 30);
    
    		var target = this.hash,
    		$target = $(target);
    
    		$('html, body').stop().animate({
    			'scrollTop': $target.offset().top-50
    		}, 800, function () {
    			window.location.hash = target;
    			$(document).on("scroll", onScroll);
    		});
    	});
    
    // Скролл-прогресс
    
    function onScroll(){
    	var scrollPos = $(document).scrollTop();
    
    	$('.inner-nav a').each(function () {
    
    		var currLink = $(this);
    		var refElement = $(currLink.attr("href"));
    
    		if (refElement.position().top-50 <= scrollPos && refElement.position().top + refElement.height() > scrollPos) {
    			$('.inner-nav a').removeClass("active");
    			currLink.addClass("active");
    
    			var left = currLink.position().left,
    			width = currLink.width();
    
    			if (lastactive!=currLink.attr('href')) {
    				lastactive = currLink.attr('href');
    				$( ".nav-button-selected-visible" ).stop().animate({
    					width: width + 'px',
    					left: left + 'px'
    				}, 30);
    			}
    		} else {
    			currLink.removeClass("active");
    		}
    	});
    }
    });
    Ответ написан
    Комментировать