Skip to content

Instantly share code, notes, and snippets.

@rajubd49
Last active August 29, 2015 14:19
Show Gist options
  • Save rajubd49/ebdd3bbe5cf2a454d9e1 to your computer and use it in GitHub Desktop.
Save rajubd49/ebdd3bbe5cf2a454d9e1 to your computer and use it in GitHub Desktop.
Fly out/in a view - Appcelerator titanium
var newtop = Ti.Platform.displayCaps.platformHeight + 20;
function doBox(e) {
$.box.animate({
top:newtop,
duration:2000,
autoreverse: true
});
}
$.index.open();
".container": {
backgroundColor:"white"
},
".box": {
height:50,
width:100,
color:'#fff',
font:{
fontWeight:'bold'
},
textAlign: 'center',
top: 50,
backgroundColor: 'red'
}
<Alloy>
<Window class="container">
<Label id="box" class="box" onClick="doBox">Fly Out/In</Label>
</Window>
</Alloy>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment