Skip to content

Instantly share code, notes, and snippets.

View alex-grsm's full-sized avatar
🖤

Alexey alex-grsm

🖤
View GitHub Profile
@alex-grsm
alex-grsm / html
Created October 12, 2020 13:02 — forked from maxdenaro/html
HTML Email Template
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>HTML Template</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<style>
body {
width: 100% !important;
@alex-grsm
alex-grsm / Slick in tab reinit
Last active December 8, 2017 12:03
Slick in tab
$(".ej-tab_item").not(":first").hide();
$(".ej-wrapper .ej-tab").click(function() {
$(".ej-wrapper .ej-tab").removeClass("ej-active").eq($(this).index()).addClass("ej-active");
$(".ej-tab_item").hide().eq($(this).index()).fadeIn();
$(".carousel-hitu__inner-" + $(this).index()).slick("reinit");
}).eq(0).addClass("ej-active");
$('.carousel-hitu__inner-0').slick({
infinite: true,
speed: 700,
/*** Html ***/
<div class="s-app footer__bottom hide">
>>content<<
</div>
/*** CSS ***/
.footer__bottom.hide
transform: translateY(100px)
/*** JS ***/
$(function() {
@alex-grsm
alex-grsm / Events in cookies remembers
Last active January 29, 2018 10:50
For fixed bottom block
/*** html + php ***/
<div class="footer__bottom"<?= ($_COOKIE['hidee'] == 'y') ? 'style="display: none;"' : '' ?>>
/*** Html ***/
<div class="s-app footer__bottom hide">
>>content<<
</div>
/*** CSS ***/
.footer__bottom.hide
@alex-grsm
alex-grsm / Magic scroll id
Created October 4, 2017 18:54
Magic scroll id
$(".s-delivery .delivery-wrap__inner").on("click","a", function (event) {
//отменяем стандартную обработку нажатия по ссылке
event.preventDefault();
//забираем идентификатор бока с атрибута href
var id = $(this).attr('href'),
//узнаем высоту от начала страницы до блока на который ссылается якорь
top = $(id).offset().top;
@alex-grsm
alex-grsm / gulpfile.js
Created October 3, 2017 07:28 — forked from agragregra/gulpfile.js
Image Resize + Watermark + Thumbnails
var src = "___library/7-kazan/1/*";
var dst = "_ready";
var gulp = require('gulp'),
imagemin = require('gulp-imagemin'),
cache = require('gulp-cache'),
del = require('del'),
imageResize = require('gulp-image-resize'),
watermark = require("gulp-watermark"),
rename = require("gulp-rename");
@alex-grsm
alex-grsm / Cash for close block
Created May 18, 2017 07:25
Cash for close block
var dec = $('.footer__bottom');
if (document.cookie.indexOf('footer__bottom=1') !== -1) {
dec.addClass('hide');
dec.find('.txt-d').html('');
}
$('.footer__bottom').click(function() {
if (dec.attr('class') === 'footer__bottom hide')
@alex-grsm
alex-grsm / Closing an open Toggle on startup of the second + .active
Last active April 14, 2017 12:08
Closing an open Toggle on startup of the second + .active
.item-conference.parttwo > .item-conference__head + .item-conference__content (display:none)
$(".item-conference.parttwo .item-conference__head").not(".active").click(function(){
var curBlock = $(this).siblings(".item-conference.parttwo .item-conference__content");
if (curBlock.parent().children(".item-conference__head.active").length == 0) {
$(".item-conference.parttwo .item-conference__head").removeClass("active");
$(this).addClass("active");
$(".item-conference.parttwo .item-conference__content").not(curBlock).hide();
@alex-grsm
alex-grsm / Closing an open Toggle on startup of the second
Created April 14, 2017 09:55
Closing an open Toggle on startup of the second
<!-- HTML -->
<div>
<a href="" class="splLink">Link 1</a>
<div class="splCont">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</div>
</div>
<div>
<a href="" class="splLink">Link 2</a>
<div class="splCont">Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt, explicabo.</div>
</div>
@alex-grsm
alex-grsm / jQuery Tabs Short GR8
Last active April 12, 2017 14:37
jQuery Tabs Short GR8
$(".s-partners__content").not(":first").hide();
$(".s-partners .carousel-brand").click(function() {
$(".s-partners .carousel-brand").removeClass("activee");
$(this).addClass("activee");
var id = $(this).data('id');
console.log(id);
$(".partners-content-wrap").find(".s-partners__content").hide();
$(".item-" + id).show();
});