`

Fadding

    博客分类:
  • Dojo
阅读更多
<button id="fadeOutButton">Fade block out</button>
<button id="fadeInButton">Fade block in</button>

<div id="fadeTarget" class="red-block">
	A red block
</div>
<script>
	dojo.ready(function(){
		var fadeOutButton = dojo.byId("fadeOutButton"),
			fadeInButton = dojo.byId("fadeInButton"),
			fadeTarget = dojo.byId("fadeTarget");

		dojo.connect(fadeOutButton, "onclick", function(evt){
			dojo.fadeOut({ node: fadeTarget }).play();
		});
		dojo.connect(fadeInButton, "onclick", function(evt){
			dojo.fadeIn({ node: fadeTarget }).play();
		});
	});
</script>

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics