Creating an html5 video player.
A Pen by Terri Neal on CodePen.
!function(){function n(n){return n&&(n.ownerDocument||n.document||n).documentElement}function t(n){return n&&(n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView)}function e(n,t){return t>n?-1:n>t?1:n>=t?0:0/0}function r(n){return null===n?0/0:+n}function u(n){return!isNaN(n)}function i(n){return{left:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)<0?r=i+1:u=i}return r},right:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)>0?u=i:r=i+1}return r}}}function o(n){return n.length}function a(n){for(var t=1;n*t%1;)t*=10;return t}function c(n,t){for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}function l(){this._=Object.create(null)}function s(n){return(n+="")===pa||n[0]===va?va+n:n}function f(n){return(n+="")[0]===va?n.slice(1):n}function h(n){return s(n)in this._}function g(n){return(n=s(n))in this._&&delete this._[n]}function p(){var n=[] |
Creating an html5 video player.
A Pen by Terri Neal on CodePen.
var animals = [ | |
{ name: "Waffles", type: "dog", age: 12 }, | |
{ name: "Fluffy", type: "cat", age: 14 }, | |
{ name: "Spelunky", type: "dog", age: 4 }, | |
{ name: "Hank", type: "dog", age: 11 } | |
]; | |
// filter dogs | |
animals = animals.filter(function(animal) { | |
return animal.type === "dog"; |
jQuery.expr[':'].regex = function(elem, index, match) { | |
var matchParams = match[3].split(','), | |
validLabels = /^(data|css):/, | |
attr = { | |
method: matchParams[0].match(validLabels) ? | |
matchParams[0].split(':')[0] : 'attr', | |
property: matchParams.shift().replace(validLabels,'') | |
}, | |
regexFlags = 'ig', | |
regex = new RegExp(matchParams.join('').replace(/^s+|s+$/g,''), regexFlags); |
@font-face { | |
font-family: 'MyWebFont'; | |
src: url('webfont.eot'); /* IE9 Compat Modes */ | |
src: url('webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ | |
url('webfont.woff') format('woff'), /* Modern Browsers */ | |
url('webfont.ttf') format('truetype'), /* Safari, Android, iOS */ | |
url('webfont.svg#svgFontName') format('svg'); /* Legacy iOS */ | |
} | |
body { |
// jQuery code | |
var i = document.createElement("input"); | |
// Only bind if placeholder isn't natively supported by the browser | |
if (!("placeholder" in i)) { | |
$("input[placeholder]").each(function () { | |
var self = $(this); | |
self.val(self.attr("placeholder")).bind({ | |
focus: function () { | |
if (self.val() === self.attr("placeholder")) { |
<!doctype html> | |
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ --> | |
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]--> | |
<!--[if IE 7]> <html class="no-js ie7 oldie" lang="en"> <![endif]--> | |
<!--[if IE 8]> <html class="no-js ie8 oldie" lang="en"> <![endif]--> | |
<!-- Consider adding an manifest.appcache: h5bp.com/d/Offline --> | |
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]--> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Title</title> |
@-moz-document url-prefix() { | |
.date { | |
padding: 16px 0 0 0; | |
} | |
.date p span { | |
padding: 9px 0 3px 0; | |
} | |
} |
<?php | |
function is_valid_email($email) | |
{ | |
if(preg_match("/[a-zA-Z0-9_-.+]+@[a-zA-Z0-9-]+.[a-zA-Z]+/", $email) > 0) | |
return true; | |
else | |
return false; | |
} |
// Browser detection | |
// Internet Explorer | |
var ie = document.all != null; //ie4 and above | |
var ie5 = document.getElementById && document.all; | |
var ie6 = document.getElementById && document.all&&(navigator.appVersion.indexOf("MSIE 6.")>=0); | |
// Netscape | |
var ns4 = document.layers != null; | |
var ns6 = document.getElementById && !document.all; |