YouTip LogoYouTip

Api Transfer Effect

# jQuery UI API - Transfer Effect ## Category (#) ## Usage **Description:** Transfers the outline of an element to another element. transfer | Parameter | Type | Description | | --- | --- | --- | | className | String | The parameterized class name that the transferred element will receive. | | to | String | A jQuery selector for the element to transfer to. | Very useful when attempting visual interactions between two elements. The transferred element itself receives the class `ui-effects-transfer`. Any additional styling must be defined by you, such as adding a background or border. ## Example Click on the green element to transfer it to the other element. Transfer Effect Demo div.green { width: 100px; height: 80px; background: green; border: 1px solid black; position: relative; } div.red { margin-top: 10px; width: 50px; height: 30px; background: red; border: 1px solid black; position: relative; } .ui-effects-transfer { border: 1px dotted black; }
$( "div" ).click(function() { var i = 1 - $( "div" ).index( this ); $( this ).effect( "transfer", { to: $( "div" ).eq( i ) }, 1000 );}); (#)
← Api DraggableApi Toggleclass β†’