Skip to content

Instantly share code, notes, and snippets.

View upiter-2005's full-sized avatar
🏠
Working from home

Pavel Kuchenev upiter-2005

🏠
Working from home
  • Ukraine
View GitHub Profile
@upiter-2005
upiter-2005 / sticky.js
Created November 23, 2017 20:08
sticky js script
$(window).scroll(function() {
if ($(this).scrollTop() > 1){
$('header').addClass("sticky");
}
else{
$('header').removeClass("sticky");
}
});
@upiter-2005
upiter-2005 / Ajax send form new
Created September 13, 2017 10:15
Ajax send form new
$("#formAjax").submit(function() {
var data = $(this).serialize();
$.ajax({
type: "POST",
url: "mail.php",
data: data
}).done(function() {
$(this).find("input").val("");
alert("Спасибо за заявку! Скоро мы с вами свяжемся.");
function heightDetect(){
$(".main-head").css("height", $(window).height());
}
heightDetect();
$(window).resize(function(){
heightDetect();
});
@upiter-2005
upiter-2005 / for_owl.sass
Created July 4, 2017 20:28
Sass Цикл для карусели
$colors: $blue, $red, $accent
@for $i from 1 through length($colors)
.carousel-services .owl-item:nth-child(#{length($colors)}n+#{$i})
background-color: nth($colors, $i)
@upiter-2005
upiter-2005 / button.sass
Created July 4, 2017 09:40 — forked from agragregra/button.sass
Button Sass Styles (Universal Starter)
.button
display: inline-block
border: none
color: #fff
text-decoration: none
background-color: $accent
padding: 15px 45px
font-size: 13px
text-transform: uppercase
font-weight: 600