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() { | |
var banner_height = $('.collection-banner').height() + 220; //220 offset for header | |
var stuck = false; | |
var lastScrollY = 0; | |
var ticking = false; | |
var filter_dom; | |
var update = function() { | |
// do your stuff |
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
//after a click, wait 2 seconds before showing the cta bar. if they click again, reset the timer. | |
// ie after 2 seconds of inactivity, show the cta | |
var duration; | |
$('.ctrl-wrapper').on("click", function(){ | |
$('#global_cat').addClass('is-hidden'); //add class to hide cta | |
autoShowCta(); | |
}); |
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 validateEmail(email) { | |
var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; | |
return re.test(email); | |
} |
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
<script> | |
//PRE (jquery usecase only) | |
//load jquery library, inline or externally using defer or aysnc | |
console.log('jQuery321 Ready! - version: ' + jQuery321().jquery) | |
$j = jQuery321.noConflict(); //map to new variable (extensible) | |
//THROW (include this after above in jquery file) | |
var myElement = document.querySelector('body'); | |
var event = document.createEvent('Event'); |
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($){ | |
$(window).load(function(){ | |
//load event is sent when element and all sub-elements have been completely loaded | |
//includes images, scripts, frames, iframes, and the window object. | |
//note: care when manipulating elements visible on the initial pageload | |
}); | |
$(document).ready(function(){ | |
//fires when the dom is ready (page display might be pre- or partially- rendered) | |
}); |
NewerOlder