Benutzer-Werkzeuge

Webseiten-Werkzeuge


webdesign:dojo

Dojo Toolkit

Snippets

Enable Debugging

<head>
<script type="text/javascript" src="http://o.aolcdn.com/dojo/1.3.2/dojo/dojo.xd.js" djConfig="parseOnLoad:true,isDebug:true"></script>
</head>

Fading Text Loop

<head>
<title>Dojo Example: Fading Text Loop</title>
<meta name="author" content="pixel::doc (http://pixeldoc.kicks-ass.net/)" />
<script type="text/javascript" src="http://o.aolcdn.com/dojo/1.3.2/dojo/dojo.xd.js" djConfig="parseOnLoad:true"></script>
<script type="text/javascript" charset="utf-8">
  dojo.addOnLoad(function(){
    var fadeMeOut = dojo.fadeOut({
      node: "fadeOutIn",
      duration:2000,
      onEnd: function(){ fadeMeIn.play(); }
    }).play();
    var fadeMeIn = dojo.fadeIn({
      node: "fadeOutIn",
      duration:2000,
      onEnd: function(){ fadeMeOut.play(); }
    });
  });
</script>
</head>
<body>
<h1>Dojo Example: Fading Text Loop</h1>
<p id="fadeOutIn">This Text should fade out and in.</p>
</body>
</html>

Test: http://pixeldoc.kicks-ass.net/projects/dojo/example_fade_text.html

ToolTip

<head>
<title>Dojo Example: Tooltip</title>
<style type="text/css">
  @import "http://o.aolcdn.com/dojo/1.3.2/dijit/themes/tundra/tundra.css";
  @import "http://o.aolcdn.com/dojo/1.3.2/dojo/resources/dojo.css";
</style>
<script type="text/javascript" src="http://o.aolcdn.com/dojo/1.3.2/dojo/dojo.xd.js" djConfig="parseOnLoad:true"></script>
<script type="text/javascript">
  dojo.require("dojo.parser");
  dojo.require("dijit.Tooltip");
 
  dojo.addOnLoad(function(){
    new dijit.Tooltip({
      connectId: ["tooltip1"],
      label: "Get some sleep!"
    });
  });
</script>
</head>
<body>
<h1>Dojo Example: Tooltip</h1>
<p><span id="tooltip1">Tooltip 1</span> (Programmatic)</p>
<p><span id="tooltip2">Tooltip 2</span> (Declarative markup)<div dojoType="dijit.Tooltip" style="display:none" connectId="tooltip2">Have a shower ;-)</div></p>
</body>
</html>

Test: http://pixeldoc.kicks-ass.net/projects/dojo/tooltip.html

Tags

webdesign/dojo.txt · Zuletzt geändert: 2009/10/11 05:30 von pixeldoc