`

Wiping

    博客分类:
  • Dojo
阅读更多
<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>

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics