Skip to content

Instantly share code, notes, and snippets.

View FARCER's full-sized avatar

Anatoliy Salamatin FARCER

View GitHub Profile
@FARCER
FARCER / Custom Select
Last active November 5, 2019 12:26
Custom Select
// pug
.select
.select__header
span.select__current 456
.select__body
.select__item 123
.select__item 321
.select__item 456
/scss
@FARCER
FARCER / Tabs Native JS
Last active May 22, 2021 14:27
Tabs Native JS
// pug
ul.tabs-nav
li(data-tab-name="tab-1").tabs-nav__item.tabs-nav__item--active Таб 1
li(data-tab-name="tab-2").tabs-nav__item Таб 2
.tabs-content
.tabs-content__item.tab-1.tabs-content__item--active
p 1
.tabs-content__item.tab-2
p 2
@FARCER
FARCER / Scroll to Element
Created August 20, 2017 11:45
Scroll to Element
$('.scroll-link')
.not('[href="#"]')
.not('[href="#0"]')
.click(function (event) {
if (
location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '')
&&
location.hostname == this.hostname
) {
var target = $(this.hash);
@FARCER
FARCER / Sandwich
Last active April 21, 2021 16:39
Sandwich
.sandwich
.sandwich__line.sandwich__line--top
.sandwich__line.sandwich__line--middle
.sandwich__line.sandwich__line--bottom
.sandwich {
cursor: pointer;
height: 20px;
position: relative;
width: 32px;
@FARCER
FARCER / Checkbox custom
Last active January 19, 2019 12:49
Radio custom
label.checkbox
span.checkbox__text name
input(type="checkbox")
span.checkbox__custom
.checkbox {
cursor: pointer;
display: block;
padding-left: 35px;