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
//-----------------------------------------------// | |
//Config hamburger | |
$width: 30px; | |
$lineHeight: 4px; | |
$lineSpace: 5px; | |
$lineColor: #ffffff; | |
//Calculate other proportions | |
$top-1: 0; |
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
.clearfix:after { | |
visibility: hidden; | |
display: block; | |
font-size: 0; | |
content: " "; | |
clear: both; | |
height: 0; | |
} |
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
@mixin vertical-align { | |
position: relative; | |
top: 50%; | |
-webkit-transform: translateY(-50%); | |
-ms-transform: translateY(-50%); | |
transform: translateY(-50%); | |
} | |
.mixin p { | |
@include vertical-align; |
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
var rtime; | |
var timeout = false; | |
var delta = 200; | |
$(window).resize(function() { | |
rtime = new Date(); | |
if (timeout === false) { | |
timeout = true; | |
setTimeout(resizeend, delta); | |
} | |
}); |
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
//match height of elements | |
function matchHeight($element) { | |
var heighest = 0; | |
$element.each(function () { | |
var elemHeight = $(this).outerHeight(); | |
if (elemHeight > heighest) { | |
heighest = elemHeight; | |
} | |
}); | |
$element.css('height', heighest); |
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
$('.disable-link').click(function (event) { | |
event.preventDefault(); | |
}); |
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
var rtime; | |
var timeout = false; | |
var delta = 200; | |
$(window).resize(function() { | |
rtime = new Date(); | |
if (timeout === false) { | |
timeout = true; | |
setTimeout(resizeend, delta); | |
} | |
}); |
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
//Replace all SVG images with inline SVG | |
$('img.svg').each(function(){ | |
var $img = $(this); | |
var imgID = $img.attr('id'); | |
var imgClass = $img.attr('class'); | |
var imgURL = $img.attr('src'); | |
$.get(imgURL, function(data) { | |
// Get the SVG tag, ignore the rest | |
var $svg = $(data).find('svg'); |
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
//truncate a string...nicely | |
function stringTruncate($string, $stringLength){ | |
if (strlen($string) > $stringLength) { | |
$string = preg_replace('/\s+?(\S+)?$/', '', substr($string, 0, $stringLength)); | |
return $string . '...'; | |
}else{ | |
return $string; | |
} |
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
//Field text - remove on focus, replace on blur | |
function fieldText(){ | |
var $fieldText = jQuery('.js-text'); | |
$fieldText.focus(function(){ | |
var fText = jQuery(this).data("fieldtext"); | |
var fVal = jQuery(this).val(); | |
if(fVal === fText){ | |
jQuery(this).val(""); | |
} | |
}) |
OlderNewer