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
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> | |
<style type="text/css"> | |
#dropTarget { | |
width: 100%; | |
height: 200px; | |
border: 1px dashed #000000; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"> | |
<script> | |
window.onload = function() { | |
var element = document.getElementById("test"); | |
var result = document.getElementById("result"); | |
var count = 0; |
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 PI = Math.PI; | |
//Faster replacement for Math object methods. | |
Math.round(PI) === PI + (PI < 0 ? -0.5 : +0.5) >> 0; | |
Math.ceil(PI) === PI + (PI < 0 ? -1 : 0) >> 0; | |
Math.floor(PI) === PI + (PI < 0 ? -1 : 0) >> 0; | |
//Conditional operator is faster than Math object methods. | |
Math.max(a, b) === (a > b) ? a : b; | |
Math.min(a, b) === (a < b) ? a : b; |
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
(function (window) { | |
// This library re-implements setTimeout, setInterval, clearTimeout, clearInterval for iOS6. | |
// iOS6 suffers from a bug that kills timers that are created while a page is scrolling. | |
// This library fixes that problem by recreating timers after scrolling finishes (with interval correction). | |
// This code is free to use by anyone (MIT, blabla). | |
// Original Author: [email protected] | |
var timeouts = {}; | |
var intervals = {}; | |
var orgSetTimeout = window.setTimeout; | |
var orgSetInterval = window.setInterval; |