Skip to content

Instantly share code, notes, and snippets.

https://player.vimeo.com/video/289487190?autoplay=1&loop=1&muted=1&controls=0&background=1
var allImageLinks = $('a[href$=".jpg"]:not(.no-fancy),a[href$=".jpeg"]:not(.no-fancy),a[href$=".png"]:not(.no-fancy), .fancylink');
function initFancy(){
allImageLinks.fancybox({
});
}
initFancy();
@KaiserEMP
KaiserEMP / text
Created July 8, 2019 14:05
Paste into sql
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
var maxHeight = -1;
boxes.each(function (){
//(question)?(result if true):(result is false)
//maxHeight = maxHeight > $(this).outerHeight() ? maxHeight : $(this).outerHeight(); //shorthand
if (maxHeight > $(this).outerHeight() ) {
maxHeight = maxHeight
console.log('isit')
} else {
maxHeight = $(this).outerHeight();
console.log('isit22222')
/* Start timeline scripts ----------------------------------------------------*/
/* Start timeline scripts ----------------------------------------------------*/
/* Start timeline scripts ----------------------------------------------------*/
/* Kinetic Drag */
var $id = function (id) { return document.getElementById(id); };
var $click = function (elem, fn) {
return elem.addEventListener('click', function (e) {
fn.apply(elem, [e]);
@KaiserEMP
KaiserEMP / js
Created March 6, 2019 08:20
Click and Drag SCroll
/* click and drag */
$.fn.attachDragger = function () {
var attachment = false, lastPosition, position, difference;
$($(this).selector).on("mousedown mouseup mousemove", function (e) {
if (e.type == "mousedown") attachment = true, lastPosition = [e.clientX, e.clientY]; // jshint ignore:line
if (e.type == "mouseup") attachment = false;
if (e.type == "mousemove" && attachment == true) {
position = [e.clientX, e.clientY];
difference = [(position[0] - lastPosition[0]), (position[1] - lastPosition[1])];
$(this).scrollLeft($(this).scrollLeft() - difference[0]);
@KaiserEMP
KaiserEMP / text
Created February 27, 2019 15:01
Disable VirtualBox Host-Only Network adapter for External browsersync
Disable VirtualBox Host-Only Network adapter for External browsersync
@KaiserEMP
KaiserEMP / fnt
Created February 18, 2019 23:04
font-weight:600 issue
Truetype Hinting: keep existing
Vertical Metrics: no adjustment
@KaiserEMP
KaiserEMP / font
Created February 5, 2019 09:01
Fontsquirrel
Fontsquirrel webfont generator
Vertical Metrics tick [ NO ADJUSTMENT ] to fix
@KaiserEMP
KaiserEMP / js
Created December 6, 2018 11:34
js
$('.eda-module-type-slider .slides').imagesLoaded(function () {
//console.log('all images loaded');
$('.eda-module-type-slider .slides').addClass('images-loaded');
$('.eda-module-type-slider').each(function (index, value) {
var slides = $(this).find('.slide');
if (slides.length > 1) {
jFadeBanner($(this));
}
});