Skip to content

Instantly share code, notes, and snippets.

View keks55's full-sized avatar

keks55

View GitHub Profile
$(".popup-click").click(function(){
//$(".popup").slideToggle("fast");
//$('.mask').toggleClass('open');
$(".popup,.mask").addClass("open");
$("a.close").click(function(){
$(".popup,.mask").removeClass("open");
});
return false;
});
//jQuery for page scrolling feature
$(function() {
$('.nav li a').on('click', function(event) {
$('html, body').stop().animate({
scrollTop: $($(this).attr('href')).offset().top
}, 900);
if ($(window).width() < 769) {
$(".nav").slideToggle("fast");
}
event.preventDefault();
$(window).on('scroll', function() {
$('*[class^="land"]').each(function() {
if($(window).scrollTop() >= $(this).offset().top) {
var id = $(this).attr('id');
$('a').removeClass('current');
$('a[href=#'+ id +']').addClass('current');
}
});
});
$(window).scroll(function() {
var sticky = $('.header,.header-wrap'),
scroll = $(window).scrollTop();
(scroll >= 100 ) ? sticky.addClass('fixed') : sticky.removeClass('fixed');
});
/*css*/
.fixed{
position:fixed;
background: #BEEB9F;
@keks55
keks55 / Git aliases
Last active September 16, 2017 10:02
# git
alias ss='git status'
alias ff='git diff'
alias ll='git log'
alias show='git show'
# git add
alias dd='git add'
alias ddd='git add .'
alias cc='git commit -m'
alias ppp='git push -u origin master'