Skip to content

Instantly share code, notes, and snippets.

$("input").keyup(function() {
this.value = this.value.replace(/[^а-яё]/i, "");
});
$('.tabs-wrapper').each(function () {
let ths = $(this);
ths.find('.tab-item').not(':first').hide();
ths.find('.tab').click(function () {
ths.find('.tab').removeClass('active').eq($(this).index()).addClass('active');
ths.find('.tab-item').hide().eq($(this).index()).fadeIn()
}).eq(0).addClass('active');
});
@adilbakytbek
adilbakytbek / button.sass
Last active January 11, 2021 15:50 — 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
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<title>New Site by UXCodes</title>
<meta name="description" content="New Site by UXCode">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="icon" href="images/favicon.ico">
@adilbakytbek
adilbakytbek / picture
Last active August 4, 2020 12:54
Optimized
<picture>
<source srcset="images/dest/.webp" type="image/webp">
<source srcset="images/dest/.png" type="image/png">
<img src="images/dest/.png" alt="">
</picture>
@adilbakytbek
adilbakytbek / JsMobile
Last active December 30, 2019 15:22
Mobile-Menu(Js)
// JS
$('.hamburger').on('click', function () {
$(this).toggleClass('is-active');
$('.mnu').toggleClass('active');
$('body').toggleClass('stop-scrolling');
$('.top-line').toggleClass('top-line_fixed');
$('body').bind('touchmove', function (e) { e.preventDefault() })
if( $(this).hasClass('is-active')) {
$(".mnu .main-mnu li a").on("click", function () {