This file contains hidden or 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="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Loader Test</title> | |
<meta name="generator" content="TextMate http://macromates.com/"> | |
<meta name="author" content="Ryan Cannon"> | |
<script src="http://www.nfl.com/yui/3.4.1/build/yui/yui-min.js"></script> | |
<script> | |
var YUI_config = { |
This file contains hidden or 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
YUI.add('date-ago', function (Y) { | |
function round(value) { | |
return Math.round(value); | |
} | |
function distanceOfTimeInWords(from_time, to_time, include_s) { | |
var include_seconds, distance_in_minutes, distance_in_seconds; | |
include_seconds = include_s || false; | |
distance_in_minutes = round(Math.abs(to_time - from_time) / 60000); |
This file contains hidden or 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
YUI().use('node', 'array-extras', 'querystring-stringify', function (Y) { | |
var form = Y.one('FORM_SELECTOR'), query; | |
query = Y.QueryString.stringify(Y.Array.reduce(Y.one(form).all('input[name],select[name],textarea[name]')._nodes, {}, function (init, el, index, array) { | |
init[el.name] = el.value; | |
return init; | |
})); | |
console.log(query); | |
}); |
NewerOlder