Skip to content

Instantly share code, notes, and snippets.

View dragstarcrowant's full-sized avatar

Oleksandr Antonets dragstarcrowant

View GitHub Profile
@dragstarcrowant
dragstarcrowant / angle-between-points.js
Created October 26, 2015 14:15 — forked from conorbuck/angle-between-points.js
JavaScript: Find the angle between two points
var p1 = {
x: 20,
y: 20
};
var p2 = {
x: 40,
y: 40
};
/**
* Switch-style checkboxes.
* Inspired by Espresso’s “Tools” switch
*/
input[type="checkbox"]:not(:checked),
input[type="checkbox"]:checked { /* :checked here acting as a filter for older browsers */
position: absolute;
opacity: 0;
}
@dragstarcrowant
dragstarcrowant / preloader.js
Created March 7, 2013 09:44 — forked from adamesque/preloader.js
JS : preloader
/**
* Helper function for passing arrays of promises to $.when
*/
jQuery.whenArray = function ( array ) {
return jQuery.when.apply( this, array );
};
/**
* Accepts a single image src or an array of image srcs.