Has been added in Craft.js 1.1.7
Note : Uses Craft.js
Fills placeholders in a string with data.
;(function(){ | |
function createTransitionObject(transition) { | |
var obj = { | |
"-webkit-transition": transition, | |
"MozTransition": transition, | |
"OTransition": transition, | |
"transition": transition | |
} |
(function(k,l,r,m,i,e,c,o,g){ | |
for(i in window) k.push(i) | |
e = document.createElement("iframe") | |
e.style.display = "none" | |
document.body.appendChild(e) | |
c = e.contentWindow | |
for(o in c) l.push(o) | |
for(g=k.length;m < g;m++) if(!~l.indexOf(k[m])) r.push(k[m]) | |
return r | |
})([],[],[],0) |
Has been added in Craft.js 1.1.7
Note : Uses Craft.js
Fills placeholders in a string with data.
/* relies on Craft.js */ | |
Object.extend(String.prototype, { | |
extract : function (context){ | |
return this.split(".").fold(function(a,b){ if(a) return b in a ? a[b] : undefined}, context || window ) | |
} | |
}) | |
"document.body".extract() // HTMLBodyElement | |
"document.body.foo.bar.baz".extract() // undefined |
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<title>Welcome to my Website</title> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> | |
<script type="text/javascript" src="send.js"></script> | |
</head> | |
<body> | |
<h1>A Simple AJAX Contact Form</h1> | |
<form method="post" action="" id="contact_form"> |
(function(){ | |
function umad(){while(true) alert("umad"); umad()} | |
window.onbeforeunload = umad | |
umad() | |
})() |
;(function(){ | |
var foo = synchronousRequestInit | |
, bar = synchronousRequestInit | |
, fooResponse | |
, barResponse | |
, i = false | |
, interval | |
window.setTimeout(function(){ |
;(function(){ | |
var slice = [].slice | |
function push(array, value, length, callback){ | |
var currentLength = array.push(value) | |
, self = this | |
if(currentLength === length) self.result = callback.apply(null, array) | |
} | |