1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html dir="ltr">
<head>
<link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/dojo/1.4/dijit/themes/tundra/tundra.css">
<style type="text/css">
body, html { font-family:helvetica,arial,sans-serif; font-size:90%; }
</style>
</head>
<body class="tundra ">
<div id="showMe" style="padding: 10px;">
click here to see how it works
</div>
</body>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/dojo/1.4/dojo/dojo.xd.js"
djConfig="parseOnLoad: true">
</script>
<script>
dojo.addOnLoad(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>
<!-- NOTE: the following script tag is not intended for usage in real
world!! it is part of the CodeGlass and you should just remove it when
you use the code -->
<script type="text/javascript">
dojo.addOnLoad(function() {
if (window.pub) {
window.pub();
}
});
</script>
</html> |
Partager