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
// Jumplink scrolling | |
// ------------------------------------- | |
$('a[href^=#]').on('click', function(e) { | |
e.preventDefault(); | |
var $this = $(this), | |
targetId = $this.attr('href'), | |
target = $(targetId); | |
if(target.length) { |
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
// Usage | |
// @include placeholder { | |
// font-style:italic; | |
// color: white; | |
// font-weight:100; | |
// } | |
@mixin placeholder { | |
::-webkit-input-placeholder {@content} | |
:-moz-placeholder {@content} |
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
$('a.jumplink[href^="#"]').on('click', function(event) { | |
event.preventDefault(); | |
var $this = $(this), | |
target = $this.attr('href'); | |
if (target && target !== "#") { | |
$('html, body').animate({ | |
scrollTop: $(target).offset().top | |
}, 600); |
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
/^\-?[0-9]+([\.|\,]{1}[0-9]{1,2})?$/ |
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 getUrlParameter = function(param) { | |
var pageUrl = window.location.search.substring(1); | |
var urlVariables = pageUrl.split('&'); | |
for (var i = 0; i < urlVariables.length; i++) { | |
var parameterName = urlVariables[i].split('='); | |
if (parameterName[0] == param) { | |
return parameterName[1]; | |
} |
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
isMobile = { | |
Android: function() { | |
return navigator.userAgent.match(/Android/i); | |
}, | |
BlackBerry: function() { | |
return navigator.userAgent.match(/BlackBerry/i); | |
}, | |
iOS: function() { | |
return navigator.userAgent.match(/iPhone|iPad|iPod/i); | |
}, |
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
// Center a block element width unknown | |
// height and width horizontally and vertically | |
// If it doesn't center vertically, play with the spacing. | |
// <div class="parent"> | |
// <div class="child">....</div> | |
// </div> | |
// | |
// .parent { | |
// ... your styles here.... | |
// text-align:center; // if you need horizontally spacing |
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
if(Function('/*@cc_on return document.documentMode===10@*/')()){ | |
document.documentElement.className+=' ie10'; | |
} |
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
// Legend Safari fix | |
.legend-margin-fix(@selector, @margin) { | |
(~"@{selector}") { | |
margin-bottom: @margin; | |
} | |
(~"@{selector} + *") { | |
-webkit-margin-top-collapse: separate; | |
margin-top: @margin; | |
} |
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
<!DOCTYPE html> | |
<!-- Add classes for each IE to the HTML Tag --> | |
<!--[if lt IE 7 ]><html class="ie ie6 no-js"> <![endif]--> | |
<!--[if IE 7 ]><html class="ie ie7 no-js"> <![endif]--> | |
<!--[if IE 8 ]><html class="ie ie8 no-js"> <![endif]--> | |
<!--[if (gte IE 9)|!(IE)]><!--><html class="no-js"> <!--<![endif]--> | |
<head> | |
<title>Responsive Video</title> |