Skip to content

Instantly share code, notes, and snippets.

View zhoufenfens's full-sized avatar
:bowtie:
i am working

zhou zhoufenfens

:bowtie:
i am working
View GitHub Profile
@zhoufenfens
zhoufenfens / shadow
Created August 17, 2013 07:32
css shadow
border: 1px solid #143250;
background-color: #288edf;
box-shadow: inset 0 1px rgba(255, 255, 255, 0.36);
color: #fff;
font-weight: 500;
text-shadow: 0 -1px rgba(0, 0, 0, 0.36);
@zhoufenfens
zhoufenfens / boxshadow.css
Created November 18, 2013 03:28
box-shadow input
input {
transition: all 0.30s ease-in-out;
-webkit-transition: all 0.30s ease-in-out;
-moz-transition: all 0.30s ease-in-out;
border: #35a5e5 1px solid;
border-radius: 4px;
outline: none;
}
input:focus {
box-shadow: 0 0 5px rgba(81, 203, 238, 1);
function Parent(name, age) {
this.init.apply(this, arguments);
}
Parent.prototype = {
// 通过init解决参数传递的问题
init: function (name, age) {
this.name = name;
this.age = age;
},
# %W% %E%
#
# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
#
# Version
version=1
# Component Font Mappings
function SuppedArray() {}
SuppedArray.prototype = new Array;
SuppedArray.prototype.forEach = function (fun) {
var len = this.length;
while (len--) {
fun(this[len]);
}
};
var queue = function(funcs, scope) {
(function next() {
if(funcs.length > 0) {
funcs.shift().apply(scope || {}, [next].concat(Array.prototype.slice.call(arguments, 0)));
}
})();
};
var obj = {
value: null
var throttle = function(func, wait) {
var context, args, timeout, result, previous, later;
previous = 0;
later = function() {
previous = new Date();
timeout = null;
result = func.apply(context, args);
};
return function() {
var now = new Date(), remaining = wait - (now - previous);
app.factory("EventBus", function() {
var eventMap = {};
var EventBus = {
on : function(eventType, handler) {
//multiple event listener
if (!eventMap[eventType]) {
eventMap[eventType] = [];
}
eventMap[eventType].push(handler);
var commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg;
var cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g;
@zhoufenfens
zhoufenfens / gist:8a8b2ba56d1197cb8644
Created February 5, 2016 09:40
regularjs pagination
https://jsfiddle.net/xxtLv0ds/