Chaining

前端之家收集整理的这篇文章主要介绍了Chaining前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
<button id="slideAwayButton">Slide block away</button>
<button id="slideBackButton">Slide block back</button>

<div id="slideTarget" class="red-block slide chain">
	A red block
</div>
<script>
	dojo.require("dojo.fx");

	dojo.ready(function(){
		var slideAwayButton = dojo.byId("slideAwayButton"),slideBackButton = dojo.byId("slideBackButton"),slideTarget = dojo.byId("slideTarget");

		dojo.connect(slideAwayButton,"onclick",function(evt){
			dojo.fx.chain([
				dojo.fadeIn({ node: slideTarget }),dojo.fx.slideTo({ node: slideTarget,left: "200",top: "200" }),dojo.fadeOut({ node: slideTarget })
			]).play();
		});
		dojo.connect(slideBackButton,left: "0",top: "100" }),dojo.fadeOut({ node: slideTarget })
			]).play();
		});
	});
</script>

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

猜你在找的Dojo相关文章