Dojo Slide To Effect (Simple actions)

Causes a target control to slide to a specified position.

Defined in

Extension Library

Type of simple action

Dojo Effects (Client)

Syntax

<xe:dojofxSlideTo node="target" duration="ms" loaded="true|false" easing="function" left="pixels" top="pixels" var="name"><xe:this.attributes><xp:parameter name="name" value="value" loaded="true|false"</xp:parameter>...</xe:this.attributes></xe:dojofxSlideTo>
Table 1. Attributes
Attribute Description
attributes="json" List of JSON formatted values passed as is.
duration="ms" Duration of the animation in milliseconds. Defaults to 350.
easing="function" Function that returns the rate of change of the animation over its duration.
left="pixels" Left position to which the target slides in pixels.
loaded="true|false" Creates a tag instance when the control is loaded, or not. Defaults to true.
node="target" Identifier of the control to which the animation is applied.
top="pixels" Top position to which the target slides in pixels.
var="name" Variable name to identify the animation.

Examples

Here a button causes text to slide to a position 100 pixels from the left and 100 pixels from the top.
<xp:div id="div1"
	style="font-size:16pt;font-weight:bold;text-align:center">
	Testing testing testing
</xp:div>
<xp:button value="Slide To" id="button3">
	<xp:eventHandler event="onclick" submit="false">
		<xp:this.script>
			<xe:dojofxSlideTo node="div1" duration="1500" left="100" top="100"></xe:dojofxSlideTo>
		</xp:this.script>
	</xp:eventHandler>
</xp:button>