Skip to content

Instantly share code, notes, and snippets.

View maxxcrawford's full-sized avatar

Maxx Crawford maxxcrawford

View GitHub Profile
@maxxcrawford
maxxcrawford / colorboxResizer.js
Last active December 21, 2015 21:48
Colorbox Responsive Resizer
/* Colorbox resize function */
var resizeTimer;
function resizeColorBox()
{
if (resizeTimer) clearTimeout(resizeTimer);
resizeTimer = setTimeout(function() {
if (jQuery('#cboxOverlay').is(':visible')) {
jQuery.colorbox.load(true);
}
}, 300)
@maxxcrawford
maxxcrawford / dateShow.js
Last active December 17, 2015 16:09
Show/Hide Date Expiration
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 {