Skip to content

Instantly share code, notes, and snippets.

@taseenb
taseenb / _x.js
Created November 9, 2013 17:15
_x : an ultra-light ajax lib using the same syntax of $.ajax(), with a subset of config options (most important options are available: url, success, error, type, headers, async, timeout).
/*
* _x
* Ultra-simple ajax. Same syntax of $.ajax().
*
* Simplified from:
* Twix v1.0 - a lightweight library for making AJAX requests.
* Author: Neil Cowburn (neilco@gmail.com)
* Copyright (c) 2013 Neil Cowburn (http://github.com/neilco/)
*/
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<script type="text/javascript" src="http://codeorigin.jquery.com/jquery-2.0.3.min.js"></script>
<script src="preload.js"></script>
<script>
var text;
//var text, data;