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 has3d(){ | |
| var el = document.createElement('p'), t, has3d, | |
| transforms = { | |
| 'WebkitTransform':'-webkit-transform', | |
| 'OTransform':'-o-transform', | |
| 'MSTransform':'-ms-transform', | |
| 'MozTransform':'-moz-transform', | |
| 'transform':'transform' | |
| }; |
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
| <!DOCTYPE html> | |
| <html lang="en-us"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title><datalist in actino></title> | |
| <link rel="stylesheet" href="s.css" media="screen"> | |
| <style media="screen"> | |
| p{ | |
| font: bold 100% / 1.5 sans-serif; | |
| } |
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 hasAtSupports(){ | |
| return (window.CSSRule !== undefined) && (window.CSSRule.SUPPORTS_RULE !== undefined) | |
| } |
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
| /* | |
| Page Visibility wrapper | |
| Tiffany B. Brown <http://tiffanybbrown.com/> | |
| Released under an MIT license. | |
| This script adds a wrapper around prefixed versions of | |
| document.visibilityState and document.hidden so that you can use a | |
| single syntax and listen for a single event. | |
| Permission is hereby granted, free of charge, to any person obtaining |
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
| @mixin placeholder{ | |
| &:focus::-webkit-input-placeholder{ | |
| color: transparent; | |
| } | |
| &:focus::-moz-placeholder { | |
| color: transparent; | |
| } | |
| &:focus:-ms-input-placeholder { | |
| color: transparent; |
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
| /* | |
| input = number or numeric string. | |
| length = pad with zeroes until it hits this length. | |
| */ | |
| function zeroPadLeft(input, length){ | |
| var zero = '0', pad = '', len, padded, inp, extract; | |
| /* Convert to string */ | |
| inp = input+''; |
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 median = function(array){ | |
| var med, a, len; | |
| len = array.length; | |
| /* Sort by numeric value */ | |
| a = array.sort(function(a,b){return a - b}); | |
| med = Math.floor(len / 2); | |
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 mean = function(array){ | |
| var len, sum; | |
| sum = array.reduce( function(a,b){ | |
| return a + b; | |
| }); | |
| len = array.length; | |
| return sum / len; | |
| } | |
| mean([2,4]); // 3 |
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 formattime(timeinseconds){ | |
| var zeroes = '0', hours, minutes, seconds, time; | |
| /* | |
| Create a new date object and pass our time in seconds as the seconds parameter | |
| https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date | |
| */ | |
| time = new Date(0, 0, 0, 0, 0, timeinseconds, 0); | |
| hours = time.getHours(); |
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 formatUSPhoneNumber(number) { | |
| var x = 0, groups = [], len, num; | |
| /* Force string conversion */ | |
| num = number+''; | |
| /* Remove non numeric characters */ |
OlderNewer