Skip to content

Instantly share code, notes, and snippets.

View caridy's full-sized avatar

Caridy Patiño caridy

  • Salesforce, Inc.
  • Miami, FL.
  • X @caridy
View GitHub Profile
@caridy
caridy / digg.js
Created October 31, 2011 15:17 — forked from davglass/digg.js
#!/usr/bin/env node
var YUI = require("yui3").YUI;
YUI({
debug: true
}).use('node', 'io', function(Y) {
//Messing with the main page..
Y.one('title').set('innerHTML', 'Digg News Headlines');
@caridy
caridy / gist:1042783
Created June 23, 2011 15:38
yui vs persistent Y
var http = require('http');
var YUI = require('yui3').YUI;
// persistent Y
var global_Y = YUI({
fetchCSS: false,
useConsoleOutput: false
});
http.createServer(function (req, res) {
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>fast page</title>
<link type="text/css" href='http://company.cdn.com/combo?
1.1/rollout/app.css'>
</head>
<body class="yui3-skin-sam">
<script type="text/javascript">
@caridy
caridy / init.js
Created October 29, 2010 19:44
loading-strategy
YUI().use('tabview', function(Y) {
var config = Y.config.app || {};
if (config.tabview) {
new Y.TabView({
srcNode: config.tabview
});
}
});
@caridy
caridy / event-binder-markup.html
Created October 27, 2010 22:04
event-binder-regular-listener
<!DOCTYPE html>
<html>
<head>
<title>fast page</title>
<link rel="stylesheet" type="text/css" href='http://company.cdn.com/combo?
1.2/rollout/app.css'>
</head>
<body class="yui3-skin-sam">
<script>
YUI_config = {
<!doctype html>
<html>
<head>
<title>Event Binder Evolution</title>
</head>
<body>
<div id="doc">
<div id="democlick">
<!doctype html>
<html>
<head>
<title>Event Binder - Simple</title>
</head>
<body>
<div id="doc">
<div id="democlick">
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>test</title>
</head>
<body>
<!-- YUI 3 Seed //-->
YUI_config = {
// standard YUI_config configuration
combine: true,
filter: 'min',
// event binder configuration starts here
eventbinder: {
// set of options that should be preserved for every event (all optional)
ev: {
ctrlKey: 0,
altKey: 0,
/**
* <p>The Dispatcher satisfies a very common need of developers using the
* YUI library: dynamic execution of HTML Fragments or remote content. Typical strategies to
* fulfill this need, like executing the innerHTML property or referencing remote
* scripts, are unreliable due to browser incompatibilities. The Dispatcher normalize
* this behavior across all a-grade browsers.
*
* <p>To use the Dispatcher Module, simply create a new object based on Y.Dispatcher
* and pass a reference to a node that should be handled.</p>
*