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 ua = navigator.userAgent, | |
uaFunc = function(s,h) { return (h.indexOf(s) > -1)}; | |
var userInfo = {}; | |
if(uaFunc("iPhone", ua)) { | |
userInfo.device = "iPhone"; | |
} else if(uaFunc("iPad", ua)) { | |
userInfo.device = "iPad"; | |
} else if(uaFunc("Android", ua)) { | |
userInfo.device = "Android"; |
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 elm = document.getElementById("elm"); | |
var getElmPosition = function(elm) { | |
var left = 0, | |
top = 0; | |
while(elm.parentNode) { | |
left += elm.offsetLeft; | |
top += elm.offsetTop; | |
elm = elm.parentNode; |
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 cloneItem = new Array(); | |
var defaultItem = [0,1,2,3,4,5,6,7]; | |
//clone | |
Array.prototype.clone = function() { | |
if (this[0].constructor == Array ) { | |
var ar, n; | |
ar = new Array(this.length); | |
for(n = 0; n < ar.length; n++) { | |
ar[n] = this[n].clone(); |
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 div = document.getElementById("result"), | |
elm = document.getElementById("elm"); | |
var computedStyle,mat,a,b,c,d,e,f, | |
reMat = /matrix\(\s*(-?\d+(?:\.\d+)?)\s*,\s*(-?\d+(?:\.\d+)?)\s*,\s*(-?\d+(?:\.\d+)?)\s*,\s*(-?\d+(?:\.\d+)?)\s*\,\s*(-?\d+(?:\.\d+)?)\s*,\s*(-?\d+(?:\.\d+)?)\s*\)/; | |
computedStyle = window.getComputedStyle(elm, null); | |
mat = computedStyle['-webkit-transform'].match(reMat).slice(1); | |
a = parseFloat(mat[0], 10); | |
b = parseFloat(mat[1], 10); |
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 AjaxTime = 10000; | |
var AjaxPath = { | |
requestFile: "ajaxPath" | |
}; | |
var AjaxController = function(){}; | |
AjaxController.prototype ={ | |
createHttpRequest: function() { | |
try { | |
return newXMLHttpRequest(); |
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
/* | |
* Author: Daisuke Takayama | |
* Website:http://www.webcyou.com/?p=5915 | |
*/ | |
'use strict'; | |
var e = eval, global = e('this'); | |
module Schedule { | |
/* |
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 vendor = { | |
name: "", | |
browser: "", | |
prefix: "", | |
transitionend: whichTransitionEvent(), | |
animationend: whichAnimationEvent() | |
}; | |
function whichAnimationEvent() { | |
var t, |