Skip to content

Instantly share code, notes, and snippets.

View Taleynikov's full-sized avatar

Maxim Taleynikov Taleynikov

View GitHub Profile
@Taleynikov
Taleynikov / accept.js
Created September 18, 2018 11:20
form accept lock
$('.form-accept__input').change(function(event) {
var check = $(this).prop('checked');
if (!check) {
event.preventDefault();
$(this).parents('.form').find('.form__btn').attr('disabled', 'disabled');
} else {
$(this).parents('.form').find('.form__btn').removeAttr('disabled');
};
});
// ============================
// RESETS
// ============================
table, thead, tbody, tfoot, tr, th, td
margin: 0
padding: 0
border: none
border-collapse: inherit
border-spacing: 0
border-color: inherit
$('').keypress(function(e) {
if (e.ctrlKey || e.altKey || e.metaKey) return;
var chr = getChar(e);
if (chr == null) return;
if (chr < '0' || chr > '9') {
return false;
}
@Taleynikov
Taleynikov / README.md
Created January 29, 2018 15:12 — forked from jonathantneal/README.md
SASS @font-face mixin

Font Face

A mixin for writing @font-face rules in SASS.

Usage

Create a font face rule. Embedded OpenType, WOFF2, WOFF, TrueType, and SVG files are automatically sourced.

@include font-face(Samplino, fonts/Samplino);