Skip to content

Instantly share code, notes, and snippets.

@0632347878
0632347878 / README.md
Created December 23, 2020 15:11 — forked from joyrexus/README.md
Vanilla JS equivalents of jQuery methods

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@0632347878
0632347878 / toggle-checkbox.html
Created January 13, 2018 08:41 — forked from chrisdavies/toggle-checkbox.html
A CSS-only (no JS) checkbox toggle control. Might make the label text (yes/no) markkup rather than CSS injected content.
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Toggle Example</title>
<style>
body {
font-family: sans-serif;
}
@0632347878
0632347878 / gist:81c8d5974be0628b446884b3f1062726
Created August 9, 2017 14:22 — forked from realmyst/gist:1262561
Склонение числительных в javascript
function declOfNum(number, titles) {
cases = [2, 0, 1, 1, 1, 2];
return titles[ (number%100>4 && number%100<20)? 2 : cases[(number%10<5)?number%10:5] ];
}
use:
declOfNum(count, ['найдена', 'найдено', 'найдены']);
@0632347878
0632347878 / config.json
Created September 27, 2016 23:46 — forked from anonymous/config.json
Bootstrap Customizer Config
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#428bca, 6.5%)",
"@brand-success": "#5cb85c",