Dojo Toolkit Reference Guide¶
Dojo¶
-
The base functionality of the Dojo Toolkit, provided by just including
dojo.js
. This includes tons of features like CSS-based queries, event handling, animations, Ajax, class-based programming, and a package system that makes getting access to the rest of Dojo a snap.
<script>
dojo.ready(function(){
dojo.query("#showMe").onclick(function(e){
var node = e.target;
var a = dojo.anim(node, {
backgroundColor: "#363636",
color: "#f7f7f7"
}, 1000);
dojo.connect(a, "onEnd", function(){
dojo.anim(node, { color: "#363636" }, null, null, function(){
node.innerHTML = "wow, that was easy!";
dojo.anim(node, { color: "white" });
});
});
});
});
</script>
<div id="showMe" style="padding: 10px;">
click here to see how it works
</div>
-
Additional stable (but optional) components for advanced animations, I/O, data, Drag and Drop and much more.
<script>
dojo.require("dojo.fx");
dojo.require("dojo.fx.easing");
dojo.ready(function(){
dojo.query("#showMe2").onclick(function(e){
dojo.animateProperty({
node: e.target,
properties:{
marginLeft:200
},
easing: dojo.fx.easing.elasticOut,
duration:1200,
onEnd: function(n){
dojo.anim(n, { marginLeft:2 }, 2000, dojo.fx.easing.bounceOut);
}
}).play();
});
});
</script>
<div id="showMe2" style="padding: 10px; margin-left:2px;">
Click to Animate me with built in easing functions.
</div>
Dijit¶
Dijit is Dojo’s themeable, accessible, easy-to-customize UI Library. There are many widgets to choose from, so be sure to check out the quickstart guide which covers the basics. Dijit requires dojo.js
and other Core modules.
DojoX¶
DojoX stands for Dojo eXtensions and contains many useful sub-projects and varying states of maturity – from very stable and robust, to alpha and experimental. All DojoX projects contain README files that outline their maturity and authorship, so be sure to check those along with the documentation pages to get the full picture of where a module is headed.
DojoC¶
DojoC is an external svn repository used by DojoCampus for a variety of widgets, tutorials, sandbox, and other demos. You are welcome to explore and contribute, though absolutely nothing is guaranteed to work. DojoC is meant as a community workshop, and code comes and goes frequently, often times ‘promoted’ to DojoX projects.
Miscellaneous¶
- Multiple Versions of Dojo on a Page - Dojo has special configuration and build options to allow you to use different versions of Dojo on the same page.
- Developer Notes
- Styleguides obsolete