Fadding

前端之家收集整理的这篇文章主要介绍了Fadding前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
<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,function(evt){
			dojo.fadeIn({ node: fadeTarget }).play();
		});
	});
</script>

原文链接:https://www.f2er.com/dojo/291696.html

猜你在找的Dojo相关文章