This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.addEventListener('DOMContentLoaded', () => { | |
function myFunction() { | |
const winScroll = document.body.scrollTop || document.documentElement.scrollTop; | |
const height = document.documentElement.scrollHeight - document.documentElement.clientHeight; | |
const scrolled = (winScroll / height) * 100; | |
// console.info(scrolled); | |
document.getElementById('myBar').style.width = `${scrolled}%`; | |
} | |
window.onscroll = () => { | |
myFunction(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#form-one').validate({ | |
rules: { | |
myname: { | |
required: true, | |
minlength: 3, | |
}, | |
myemail: { | |
required: true, | |
email: true, | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(".header__menu-btn").on("click", () => { | |
$(".header__menu > ul").toggleClass("active"); | |
$('.hamburger').toggleClass('is-active'); | |
}); | |
$(".header__drop-down.drop-down a").on("click", () => { | |
$(".header__drop-down> a").toggleClass("arrows_top"); | |
$(".drop-down__list").toggleClass("visible"); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mobile: 360 x 640. | |
Mobile: 375 x 667. | |
Mobile: 360 x 720. | |
iPhone X: 375 x 812. | |
Pixel 2: 411 x 731. | |
Tablet: 768 x 1024. | |
Laptop: 1366 x 768. | |
High-res laptop or desktop: 1920 x 1080. | |
4k monitors: 3840×2160 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function () { | |
let objToStick = $(".nav"); //Получаем нужный объект | |
// var topOfObjToStick = $(objToStick).offset().top; //Получаем начальное расположение нашего блока | |
$(window).scroll(function () { | |
let windowScroll = $(window).scrollTop();//Получаем величину, показывающую на сколько прокручено окно | |
if (windowScroll > 250) { // Если прокрутили больше, чем расстояние до блока, то приклеиваем его | |
$(objToStick).addClass("menu-up-lip"); | |
} else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.ani { | |
font-feature-settings: "tnum"; | |
font-variant-numeric: tabular-nums; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('.top_line_menu ul').superfish({ | |
delay: 300, | |
animation: { | |
opacity: 'show' | |
}, | |
animationOut: { | |
opacity: 'hide' | |
}, | |
speed: 'normal', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('.content_d').css({ | |
color: '#eeee', | |
'line-height': '1.5', | |
border: '1px solid orange', | |
padding: '20px', | |
'margin-bottom': '1020px', | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
overflow: hidden; | |
} | |
.container { | |
overflow-y : scroll; | |
scroll-behavior:smooth; | |
scroll-snap-type:y mandatory; | |
} | |
section{ | |
scroll-snap-align:center; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
const cookieEl = document.querySelector('.cookie-block'); | |
const okEl = document.querySelector('.ok'); | |
okEl.addEventListener('click', () => { | |
cookieEl.style.display = 'none'; | |
}); | |
let cookies = () => { | |
if (!Cookies.get('hide-cookie')) { | |
setTimeout(() => { |