This file contains 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
Y.use('dd-drag', function(Y) { | |
var dd = new Y.DD.Drag({ | |
node: '#foo' | |
}); | |
}); |
This file contains 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
// Define a function to handle the response data. | |
function complete(id, o, args) { | |
var id = id; // Transaction ID. | |
var data = o.responseText; // Response data. | |
}; | |
//subscribe to the complete event | |
Y.on('io:complete', complete, Y); | |
// Make an HTTP request to 'get.php'. |
This file contains 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
//fade #demo off to full opacity, then remove it from the dom: | |
Y.one('#demo').transition({ | |
easing: 'ease-out', | |
duration: 2, // seconds | |
opacity: 0 | |
}, function() { | |
this.remove(); | |
}); |
This file contains 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
//get an element reference, add a click handler | |
Y.one('#demo').on('click', function(e) {/*handle click*/}); | |
//add content to an element | |
Y.one('#demo').append(" Additional content added to #demo."); | |
//listen for any click on any <li> that descends from #demo: | |
Y.one('#demo').delegate('click', function(e) {/*handle clidk*/}, 'li'); | |
//move #demo to the location of any click on the document |
This file contains 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
<script type="text/javascript" | |
src="http://yui.yahooapis.com/3.2.0pr2/build/simpleyui/simpleyui-min.js"></script> | |
<script> | |
//Y is ready to use; no instantiation necessary: | |
Y.one("#foo").addClass("highlight"); | |
</script> |
This file contains 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 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
<title>Profiling YUI DataTable with Profiler and ProfilerViewer: Simple Example</title> | |
<!-- Combo-handled YUI CSS files: --> | |
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/combo?2.7.0/build/datatable/assets/skins/sam/datatable.css&2.7.0/build/profilerviewer/assets/skins/sam/profilerviewer.css"> | |
<!-- Combo-handled YUI JS files: --> | |
<script type="text/javascript" src="http://yui.yahooapis.com/combo?2.7.0/build/yuiloader/yuiloader-min.js&2.7.0/build/dom/dom-min.js&2.7.0/build/event/event-min.js&2.7.0/build/dragdrop/dragdrop-min.js&2.7.0/build/element/element-min.js&2.7.0/build/datasource/datasource-min.js&2.7.0/build/datatable/datatable-min.js&2.7.0/build/profiler/profiler-min.js&2.7.0/build/profilerviewer/profilerviewer-min.js"></script> |