Skip to content

Instantly share code, notes, and snippets.

View floatValidator
floatValidator(event) {
const value =;
const key = event.key;
const newValue = value + key;
const patternZeroInBeginning = /^0+(\d)/;
const patternNumber = /\d/;
if ((key !== '.' && !patternNumber.test(key)) || value && key === '.' && value.indexOf('.') > 0) {
Jenya476 / custom radio-buttons
Last active Dec 13, 2017
Стилизация radio-buttons
View custom radio-buttons
top: 3px;
height: 16px;
width: 16px;
margin-left: 30px;
margin-right: 15px;
background-color: #ffffff;
border: 2px solid #00a191;
View Sublime def
// Place your settings in the file "User/Preferences.sublime-settings", which
// overrides the settings in here.
// Settings may also be placed in file type specific options files, for
// example, in Packages/Python/Python.sublime-settings for python files.
// Sets the colors used within the text area
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
// Note that the font_face and font_size are overridden in the platform
Jenya476 / adaptive menu
Created Feb 23, 2017
Скрипт адаптивного меню
View adaptive menu
// открытие и скрытие меню по клику
//объявляем переменные (кнопка меню и само меню)
var mnuBtn = $('.mnu_btn'),
mnu_toogle = $('.mnu_wrap');
//действие по клику {
Jenya476 / mnu_btn
Last active Feb 20, 2017
Кнопка меню с анимацией при нажатии
View mnu_btn
<div class="wrapper">
<div class="top bar"></div>
<div class="middle bar"></div>
<div class="bottom bar"></div>
Jenya476 / Beautiful underline when hovering
Created Feb 17, 2017
Красивое подчеркивание при навидении
View Beautiful underline when hovering
content: ""
display: block
height: 1px
background-color: #fff
position: absolute
right: 50%
left: 50%
bottom: 0
transition: all 300ms
Jenya476 / Smoothscrol
Created Feb 17, 2017
Плавный сролл до блока
View Smoothscrol
$('a[data-target^="anchor"]').bind('click.smoothscroll', function(){
var target = $(this).attr('href'),
bl_top = $(target).offset().top - 70;
$('body, html').animate({scrollTop: bl_top}, 700);
return false;
Jenya476 / Fix header to scroll
Last active Feb 17, 2017
Фикcированная шапка при скролле
View Fix header to scroll
if ($(this).scrollTop() > 20) {
} else {
Jenya476 / index.html
Last active Jan 26, 2017
Универсальный PHP скрипт обратной связи
View index.html
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
Jenya476 / Menu_mini_js
Last active Dec 24, 2016
Скрипт создания дубликата меню для телефонов
View Menu_mini_js
$(".left_sidebar_list").after("<div id='mobile-menu-sb'>").clone().appendTo("#mobile-menu-sb");
$("#mobile-menu-sb").find("*").attr("style", "");
// slidingSubmenus: true,
extensions : [ 'widescreen', 'effect-menu-slide' ],
navbar: {
title: "Продукция"
You can’t perform that action at this time.