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, "onclick", function(evt){
			dojo.fx.wipeIn({ node: wipeTarget }).play();
		});
	});
</script>

你可能感兴趣的:(html,dojo)