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
/** | |
* Usage reorderStates('#txtState') | |
* .getArrayOfOptionAttrs() | |
* .orderByUsa() | |
* .renderOptions(); | |
*/ | |
var reorderStates = (function($){ | |
var canadaStates = ['Alberta', 'British Columbia', 'Manitoba', 'New Brunswick', | |
'Newfoundland & Labrador', 'Nova Scotia', 'Ontario', 'Prince Edward Island', |
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
/* jshint sub: true */ | |
/** | |
* Usage reorderStates('#txtState') | |
* .getArrayOfOptionAttrs() | |
* .orderByUsa() | |
* .renderOptions(); | |
*/ |
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
app.directive('dynamicYoutubeEmbed', function($window){ | |
return { | |
restrict: 'A', // E = Element, A = Attribute, C = Class, M = Comment | |
link: function($scope, iElm, iAttrs, controller) { | |
var $video = $(iElm); | |
var $fluidEl = $video.parent(); | |
var aspectRatio = Number(iAttrs.height) / Number(iAttrs.width); | |
$video.removeAttr('height').removeAttr('width'); |
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
(function (root) { | |
var jlib; | |
var jcore = {}; | |
var jtypes = Object.create(jcore); | |
var defaults = {}; | |
var TYPES = ['Arguments', 'Array', 'Boolean', 'Date', 'Error', 'Function', 'Null', 'Number', 'Object', 'RegExp', 'Map', 'Symbol', 'String', 'Undefined']; | |
jlib = function(subject) { | |
var type = jlib.typer(subject); | |
var j; | |
jtypes[type] = jtypes[type] || {}; |
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
(function($){ | |
$(function(){ | |
var headerHeight = 0; | |
$(window).on('resize, scroll', function(){ | |
if (headerHeight === $('header').height()){ return false; } | |
headerHeight = $('header').height(); | |
changeAnchorPadding(headerHeight); |
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
(function ($) { | |
$(function () { | |
$('.secondaryNavList a').each(function () { | |
function replaceBetween(str, what, start, end) { | |
return str.substring(0, start) + what + str.substring(end); | |
} | |
var href = $(this).attr('href'); | |
var shouldAlter = (href.match(/\/category\//g).length > 1); | |
if (shouldAlter) { |
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
#!/usr/bin/env bash | |
nodeVersion="5.0"; | |
echo "###############################################################" | |
echo "###############################################################" | |
echo "Installing NVM, Node version $nodeVersion and the latest version of gulp" | |
echo "###############################################################" | |
echo "###############################################################" | |
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
<div class="swatch selected" data-color-id="2521"> | |
<label> | |
<img src="/Product_Images/570162911_2521_s.gif" alt="Blue Grotto" width="25" height="25"> | |
</label> | |
</div> |
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
arr = []; | |
$('.forum_header_noborder tr').each(function(){ | |
var title = $(this).find('.epinfo').text(); | |
var link = $(this).find('.magnet').attr('href') | |
arr.push({title:title,link:link}) | |
}) | |
arr.forEach(function(ar){ | |
var match = ar.title.match(/S0\dE\d\d/) | |
ar.title = match ? match[0] : ar.title |