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
//This file is used to illustrate initialization and use of the gallery-accordion visual widget | |
//Requires the following modules | |
requires: 'node', 'gallery-accordion' | |
//Declaration of Widget | |
var myAccordion = new Y.Accordion({ | |
srcNode: ".accordion", | |
useAnimation: true, | |
collapseOthersOnExpand: true |
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
//Requires the following modules | |
requires: 'tabview' | |
//Declare tabview | |
var myTabview = new Y.TabView({ | |
srcNode: "#tree" | |
}); | |
//select a tab of index 0 | |
myTabview.selectChild(0); |
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.io(uri, { | |
on: { | |
success: function (txnid, res) { | |
Y.one('#container').set('innerHTML', res.responseText); | |
}, | |
failure: function (err, res) { | |
Y.log(res.status + ":" + res.statusText); | |
} | |
} | |
}); |
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
requires: yui2-container | |
//declaration | |
var YAHOO = Y.YUI2; | |
var myPopup = function (modalElement) { | |
//create a locally scoped YUI panel | |
var modal = new YAHOO.widget.Panel(modalElement, { | |
fixedcenter: true, | |
visible: false, |
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
var cfg = { | |
method: 'POST', | |
data: '{"clientname": "Test"}', | |
headers: { 'Content-Type': 'application/json' }, | |
on: { success: function (id, o, args) { | |
Y.log('Success'); | |
}, | |
failure: function () { | |
Y.log('Post Error'); | |
} |
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
Initialise repository: git init | |
Remote add: git remote add appharbor https://paulallies@appharbor.com/nanotouch.git | |
Add files to repository: git add . | |
Check in: git commit -m 'Updated' | |
Push to repository: git push appharbor master |
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
//Bad way to declare objects and arrays | |
var person = new Object(), | |
keys = new Array(); | |
//A better way is to use object literals | |
var person = {}, | |
keys = []; | |
//Example | |
var person = { |
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
var test = function(){ | |
console.log('hello from github'); | |
}; |
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
var test = function(){ | |
alert('hello from github'); | |
}; |
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
var https = require('https'); | |
var test = ""; | |
var host = 'api.mongolab.com'; | |
var options = { | |
host: host, | |
port: 443, | |
path: "/", | |
method: 'GET' | |
}; | |
var YUI = require("yui").YUI; |
OlderNewer