Wiping

前端之家收集整理的这篇文章主要介绍了Wiping前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
<button id="wipeOutButton">Wipe block out</button>
<button id="wipeInButton">Wipe block in</button>

<div id="wipeTarget" class="red-block wipe">
	A red block
</div>
<script>
	// Load the dojo.fx module
	dojo.require("dojo.fx");

	// Don't forget,when using modules,wrap your code in a dojo.ready
	dojo.ready(function(){
		var wipeOutButton = dojo.byId("wipeOutButton"),wipeInButton = dojo.byId("wipeInButton"),wipeTarget = dojo.byId("wipeTarget");

		dojo.connect(wipeOutButton,"onclick",function(evt){
			dojo.fx.wipeOut({ node: wipeTarget }).play();
		});
		dojo.connect(wipeInButton,function(evt){
			dojo.fx.wipeIn({ node: wipeTarget }).play();
		});
	});
</script>

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

猜你在找的Dojo相关文章