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
$lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); // Outputs "fr", "en", "es", etc... |
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
$str = preg_replace('/([.!?])\s*(\w)/e', "strtoupper('\\1 \\2')", ucfirst(mb_strtolower("this string. it will be. PROCESSED!", "utf-8"))); |
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
<!--[if lte IE 8]> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script> <![endif]--> | |
<!--[if gt IE 8]> <!--> <script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script> <!--<![endif]--> | |
<script>window.jQuery || document.write('<script src="js/libs/jquery.1.10.1.min.js"><\/script>');</script> |
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
<FilesMatch ".(eot|ttf|otf|woff)$"> | |
Header set Access-Control-Allow-Origin "*" | |
</FilesMatch> |
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
@media (min--moz-device-pixel-ratio: 1.5), | |
(-o-min-device-pixel-ratio: 3/2), | |
(-webkit-min-device-pixel-ratio: 1.5), | |
(min-device-pixel-ratio: 1.5), | |
(min-resolution: 144dpi), | |
(min-resolution: 1.5dppx) { | |
// CSS | |
} |
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
<!--[if lte IE 8]> <link rel="stylesheet" href="css/libs/normalize.1.1.2.min.css"> <![endif]--> | |
<!--[if gt IE 8]> <!--> <link rel="stylesheet" href="css/libs/normalize.2.1.2.min.css"> <!--<![endif]--> |
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
var h = (function(b, d){ | |
return Math.max(b.scrollHeight, b.offsetHeight, d.clientHeight, d.scrollHeight, d.offsetHeight); | |
})(document.body, document.documentElement); |
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
<link rel="stylesheet" href="style.css" media="all"> | |
<link rel="stylesheet" href="style.tablet.css" media="all and (min-width: 570px)"> | |
<link rel="stylesheet" href="style.desktop.css" media="all and (min-width: 960px)"> | |
<!--[if (lt IE 9) & (!IEMobile)]> | |
<link rel="stylesheet" href="style.tablet.css" media="all"> | |
<link rel="stylesheet" href="style.desktop.css" media="all"> | |
<![endif]--> |
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 addClass(element, cls){ | |
if(typeof element.classList !== "undefined"){ | |
element.classList.add(cls); | |
} else { | |
element.className += element.className.indexOf(cls) == -1 ? cls : ' ' + cls; | |
} | |
return element; | |
} |
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 removeClass(element, cls){ | |
if(typeof element.classList !== "undefined"){ | |
element.classList.remove(cls); | |
return element; | |
} else { | |
if(element.className.indexOf(cls) != -1){ | |
element.className = element.className.replace(cls, ''); | |
} | |
return element; | |
} |