This file contains hidden or 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
var dateExpire = function(){ | |
var today = new Date(); //Get Raw Current Date | |
var dd = today.getDate(); // Formate Date | |
var mm = today.getMonth()+1; // Format Month | |
var yyyy = today.getFullYear(); | |
if(dd<10){dd='0'+dd} if(mm<10){mm='0'+mm} today = mm+'/'+dd+'/'+yyyy; // Assemble mm/dd/yy date | |
$('.boo').each(function(){ | |
if ($(this).attr('data-expire') < today){ | |
$(this).hide(); | |
} else { |
This file contains hidden or 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
/* Colorbox resize function */ | |
var resizeTimer; | |
function resizeColorBox() | |
{ | |
if (resizeTimer) clearTimeout(resizeTimer); | |
resizeTimer = setTimeout(function() { | |
if (jQuery('#cboxOverlay').is(':visible')) { | |
jQuery.colorbox.load(true); | |
} | |
}, 300) |
This file contains hidden or 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
if (!window.addEventListener) { | |
// DO NOTHING | |
//window.attachEvent("orientationchange", resizeColorBox); | |
} | |
else { | |
window.addEventListener("orientationchange", resizeColorBox, false); | |
} | |
This file contains hidden or 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
$(".scroll").click(function(event){ | |
event.preventDefault(); | |
//calculate destination place | |
var dest=0; | |
if($(this.hash).offset().top > $(document).height()-$(window).height()){ | |
dest=$(document).height()-$(window).height(); | |
}else{ | |
dest=$(this.hash).offset().top; | |
} | |
//go to destination |
This file contains hidden or 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
var cache = {}; | |
function getData( val ){ | |
// Return a promise from the cache (if available) | |
// or create a new one (a jqXHR object) and store it in the cache. | |
var promise = cache[val]; | |
if (!promise) { | |
promise = $.ajax('/foo/', { | |
data: { value: val }, |
This file contains hidden or 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
.block:before { | |
border: none; | |
width: 0; | |
} |
This file contains hidden or 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
document.write(new Date().getFullYear()); |
This file contains hidden or 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
<!doctype html> | |
<html> | |
<head> | |
<title>CSS animations: Example 1</title> | |
<style type="text/css"> | |
body { | |
padding: 20px; | |
} |
This file contains hidden or 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
/* global Modernizr */ | |
(function (app, $, window, document, undefined) { | |
/* SHIM: <input> placeholder shim | |
--------------------------------------------------------------------------- */ | |
if(!Modernizr.input.placeholder){ | |
$(document).on('focus', 'input[placeholder], textarea[placeholder]', function() { | |
var input = $(this); | |
if (input.val() === input.attr('placeholder')) { | |
input.val('').removeClass('placeholder'); | |
} |
This file contains hidden or 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
// ImageMagick - Convert SVG to PNG w/ transparency | |
// | |
// - open terminal | |
// | |
// - confirm you have imagemagick installed | |
// --- type: convert -v | |
// | |
// - cd to folder | |
// | |
// - single file |
OlderNewer