Skip to content

Instantly share code, notes, and snippets.

@Security2431
Security2431 / Video preview
Last active July 5, 2017 08:25
Video preview
<div class="video" data-youtube="8z9kooDFTSE">
<a class="video__play" id="video__play" href="#">
<img class="img-responsive video__img" src="img/video.jpg" alt="Трейлер">
</a>
</div>
var changeColorCell = function (number) {
var negativeNumClass = ".negative",
positiveNumClass = ".positive";
if (Object.is(Math.sign(parseFloat(number)), -0)) {
return negativeNumClass;
} else if (Object.is(Math.sign(parseFloat(number)), 0)) {
return positiveNumClass;
} else if (Object.is(Math.sign(parseFloat(number)), 1)) {
return positiveNumClass;
} else if (Object.is(Math.sign(parseFloat(number)), -1)) {
<div class="filter">
<ul class="filter__controls">
<li class="active"><a href="#" class="btn btn-default filter__controls-link" data-filter="all">все</a></li>
<li><a href="#" class="btn btn-default filter__controls-link">Nan</a></li>
<li><a href="#" class="btn btn-default filter__controls-link" data-filter=".entry">entry</a></li>
<li><a href="#" class="btn btn-default filter__controls-link" data-filter=".h2">h2</a></li>
<li><a href="#" class="btn btn-default filter__controls-link" data-filter=".w2">w2</a></li>
<li><a href="#" class="btn btn-default filter__controls-link" data-filter=".w2 .h2">w2 + h2</a></li>
</ul>
<div class="grid filter__items">
<section class="service">
<div class="service__heading">
<div class="container">
<div class="row">
<div class="col-xs-12">
<h2 class="pull-left service__title">Наши услуги</h2>
<div class="pull-right rss"><a href="#" class="rss__link"><i class="fa fa-rss rss__icon"></i><span class="hidden-xs rss__text">RSS-лента</span></a></div>
</div>
</div>
</div>
// Slick slider
if ($('#carousel-header').length) {
$('#carousel-header').slick({
dots: true,
arrows: false,
infinite: true,
slidesToShow: 1,
speed: 500,
mobileFirst: true,
swipeToSlide: '15',
.loader-wrapper {
position: fixed;
z-index: 9999;
top: 0;
right: 0;
bottom: 0;
left: 0;
background: url(http://img1.wikia.nocookie.net/__cb20140415002935/bajoterra-babosas-y-otros/es/images/a/af/Youtube.png) center center no-repeat #012a77;
-webkit-background-size: 100px 100px;
background-size: 100px 100px;
// Today date
$(function () {
Date.prototype.addDays = function(days) {
this.setDate(this.getDate() + parseInt(days));
return this;
};
Date.prototype.format = function(format) {
// set default format if function argument not provided
format = format || 'YYYY-MM-DD hh:mm';
/**!
* easyPieChart
* Lightweight plugin to render simple, animated and retina optimized pie charts
*
* @license
* @author Robert Fleischmann <[email protected]> (http://robert-fleischmann.de)
* @version 2.1.6
**/
(function(root, factory) {
@Security2431
Security2431 / Checkbox custom
Last active August 23, 2017 07:34
radio/checkbox with custom styles
<div class="checkbox-btn">
<input class="checkbox-btn__control" type="radio" name="package" id="package-1">
<label class="checkbox-btn__box" for="package-1">btn 1</label>
</div>
@Security2431
Security2431 / gsap-resources.js
Created September 29, 2017 13:46 — forked from cameronrye/gsap-resources.js
GASP Resources
// Position parameters
var tl = new TimelineLite();
tl.to(".orange", 1, {x:750})
//this just follows the first
.to(".green", 1, {x:750})
//there is a one second gap between these two tweens
.to(".blue", 1, {x:750}, "+=1")
//this goes to two seconds in
.to(".red", 1, {x:750}, "2")