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 loadByqueue(list,type,callback){ | |
var queue = [], | |
_load = { | |
"sync":function(list){ | |
var src = list[0]; | |
if(!src) callback(); | |
$.getScript(src,function(){ | |
list.shift(); | |
_load["sync"](list); | |
}); |
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
/** | |
* @author fuqiang[[email protected]] | |
* @version 20120514 | |
* @description 暂时作为照片详情页的views集合 | |
*/ | |
define('module/view', ['module/common', 'module/model', 'module/tool', 'vendor/jquery', 'module/mask', 'module/like', 'module/userRelation'], function(R, MODEL, tool, $, mask, like, userRelation) { | |
var TOOL = tool.DetailTool; | |
var ExifHeight = 56; |
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> | |
<body> | |
<style> | |
.author,.time{ | |
width:100px; | |
} | |
.content{ | |
position:relative; | |
border:#ccc solid 1px; |
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
<html> | |
<body> | |
<form name="frmMain"> | |
<input name="fireTarget"> | |
<input type="hidden" name="output"> | |
</form> | |
<script> | |
function changeRealElement () { | |
var torgand = document.frmMain["fireTarget"]; | |
var realElem = document.frmMain["output"]; |
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 events=function(){ | |
this.map={}; | |
}; | |
events.prototype={ | |
emit:function(eventname,args){ | |
if(this.map[eventname]){ | |
this.map[eventname].forEach(function(fn){ | |
fn.apply(this,args); | |
}); | |
} |
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 events=require('events').EventEmitter; | |
var test=function(){ | |
events.call(this); | |
} | |
test.prototype=Object.create(events.prototype,{ | |
constructor:{ | |
value:test, | |
enumerable:false |
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
console.log(isEqual(1,1)) | |
console.log(isEqual(1,"1")) | |
console.log(isEqual("a","a")) | |
console.log(isEqual(1,2)) | |
console.log(isEqual([[],1],[[],2])) | |
console.log(isEqual([{},1],[{},2])) | |
console.log(isEqual({},1)) | |
console.log(isEqual([],1)) |
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 lang = function() { | |
var types = ["Array", "Object", "String", "Number"], | |
ret = {}; | |
for (var i = 0; i < types.length; i++) { (function(i) { | |
var type = types[i]; | |
ret['is' + type] = function(arg) { | |
return lang._typeof(arg) === "[object " + type + "]"; | |
} | |
})(i) | |
} |
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() { | |
var G = {}; | |
G.Game = function() { | |
var start = ""; | |
this.boxWidth = 25;//单位宽度 | |
this.boxHeight = 15;//单位长度 | |
this.blockWidth = 30; //单位块 | |
this.speed = 200; //运动速度 | |
var blockWidth = this.blockWidth - 2;//border为1 预留 | |
var _this = this; |