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 validateEmail = function(email) { | |
var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; | |
return re.test(email); | |
}; |
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
// requires underscore or lodash + velocity + jquery | |
var animation = { | |
play:function(sequence, complete){ | |
_.each(sequence, function(o){ | |
var el = $(o.el); | |
el.attr('style',''); | |
_.each(o.timeline, function(a, i){ | |
el.velocity(a, {delay:a.delay, complete:a.end ? complete : null}); | |
}); |
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
<?php | |
/* | |
Original by Rasmus Larsson | |
http://www.rasmuslarsson.se/2013/05/a-template-engine-in-php/ | |
*/ | |
class Template | |
{ | |
protected $template; |
NewerOlder