Skip to content

Instantly share code, notes, and snippets.

@eduardo-matos
Created January 17, 2014 12:17
Show Gist options
  • Select an option

  • Save eduardo-matos/8472504 to your computer and use it in GitHub Desktop.

Select an option

Save eduardo-matos/8472504 to your computer and use it in GitHub Desktop.
insert/slide new item
<div id="container">
<div id="i1"></div>
</div>
require(['dojo/query', 'dojo/fx', 'dojo/fx/easing', 'dojo/NodeList-manipulate', 'dojo/NodeList-fx'], function (q, fx, easing) {
setTimeout(function () {
q('#container').prepend('<div id="i2"></div>');
q('#i2').style({marginTop: '-50px'}).animateProperty({
properties: {
marginTop: 0
}
}).play();
}, 1000);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment