Skip to content

Instantly share code, notes, and snippets.

@imthenachoman
imthenachoman / rAF.js
Last active October 12, 2016 17:54 — forked from paulirish/rAF.js
cross-browser (IE 8+) animation framework with easings
/* rAF
* ----------------------------------------------------------------------------
* cross-browser (IE 8+) animation framework with easings
*
* url : https://gist.github.com/imthenachoman/d19dc4cf6e53ad3664ea
* author : Anchal Nigam
* e-mail : imthenachoman@gmail.com
*
* Copyright (c) 2015 Anchal Nigam (imthenachoman@gmail.com)
* Licensed under the MIT license: http://opensource.org/licenses/MIT
@xeoncross
xeoncross / ajax.js
Last active August 3, 2023 06:06
Simple, cross-browser Javascript POST/GET xhr request object. Supports request data and proper AJAX headers.
/**
* IE 5.5+, Firefox, Opera, Chrome, Safari XHR object
*
* @param string url
* @param object callback
* @param mixed data
* @param null x
*/
function ajax(url, callback, data, x) {
try {
@paulirish
paulirish / rAF.js
Last active March 22, 2024 00:00
requestAnimationFrame polyfill
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
// MIT license
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];