This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Code | |
$("button").single_double_click(function () { | |
alert("Try double-clicking me!") | |
}, function () { | |
alert("Double click detected, I'm hiding") | |
$(this).hide() | |
}) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Media Queries in Sass 3.2 | |
// | |
// These mixins make media queries a breeze with Sass. | |
// The media queries from mobile up until desktop all | |
// trigger at different points along the way | |
// | |
// And important point to remember is that and width | |
// over the portrait width is considered to be part of the | |
// landscape width. This allows us to capture widths of devices | |
// that might not fit the dimensions exactly. This means the break |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
$('a').not('[href*=clientdomain\\.com]').attr('target', '_blank'); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@media | |
only screen and (-webkit-min-device-pixel-ratio: 1.3), | |
only screen and (min-device-pixel-ratio: 1.3), | |
only screen and (min-resolution: 120dpi) { | |
/* Votre code ici pour les écrans Retina */ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// My Birthday :) | |
$date_1 = new DateTime( '1989-06-15' ); | |
// Todays date | |
$date_2 = new DateTime( date( 'Y-m-d' ) ); | |
$difference = $date_2->diff( $date_1 ); | |
// Echo the as string to display in browser for testing | |
echo (string)$difference->y; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Alex Kloss <[email protected]> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* jQuery.preload | |
* | |
* Preload images using the promise pattern. | |
* | |
* Usage: | |
* | |
* $.preload(img_uri, img_uri, ...).done(function(img, img, ...) { | |
* // Do stuff with the arguments | |
* }); |