Created
March 16, 2010 21:47
-
-
Save tivac/334569 to your computer and use it in GitHub Desktop.
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("widget", function(Y) { | |
function Chiclet(config) { | |
Chiclet.superclass.constructor.apply(this, arguments); | |
} | |
Y.mix(Chiclet, { | |
NAME : "Chiclet", | |
ATTRS : { | |
speed : { value : 200 }, | |
images : [] | |
}, | |
HTML_PARSER : { | |
images : function(contentBox) { | |
return Y.all("li img"); | |
} | |
} | |
}); | |
Y.extend(Chiclet, Y.Widget, { | |
initializer : function(config) { | |
console.log("Initializer"); //TODO: REMOVE DEBUGGING CODE | |
}, | |
destructor : function() { | |
console.log("Destructor"); //TODO: REMOVE DEBUGGING CODE | |
}, | |
renderUI : function() { | |
console.log("renderUI, build some markup"); //TODO: REMOVE DEBUGGING CODE | |
console.log(this); //TODO: REMOVE DEBUGGING CODE | |
console.log(this.get("images")); //TODO: REMOVE DEBUGGING CODE | |
}, | |
bindUI : function() { | |
console.log("bindUI"); //TODO: REMOVE DEBUGGING CODE | |
}, | |
syncUI : function() { | |
console.log("syncUI"); //TODO: REMOVE DEBUGGING CODE | |
} | |
}); | |
var chiclet = new Chiclet({ contentBox: ".chiclet_widget > div" }).render(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment