Skip to content

Instantly share code, notes, and snippets.

View barretlee's full-sized avatar
💭
Make things happen!

Barret李靖 barretlee

💭
Make things happen!
View GitHub Profile
@barretlee
barretlee / barretTpl Demo
Created December 3, 2013 08:12
barretTpl Demo
<!DOCTYPE HTML>
<body>
<style type="text/css">
textarea, button, div {
display: inline-block;
vertical-align: middle;
margin-right:30px;
}
textarea {
width:500px;
@barretlee
barretlee / tplEngine Demo
Last active July 9, 2019 15:23
tplEngine Demo
var tpl = '<% for(var i = 0; i < this.posts.length; i++) {' + 
'var post = this.posts[i]; %>' +
'<% if(!post.expert){ %>' +
'<span>post is null</span>' +
'<% } else { %>' +
'<a href="#"><% post.expert %> at <% post.time %></a>' +
'<% } %>' +
'<% } %>';
var data = {
@barretlee
barretlee / Marquee.js
Last active December 20, 2015 07:49
Marquee class gist
/**
* @author 靖鸣君
* @email [email protected]
* @description 滚动
* @class Marquee
* @param {Object}
*/
var Marquee = function(){
this.direction = "top";
this.speed = 30;