This works where it elis a valid item. I used an element with an identifier demoitemto check it, therefore:
var el = $('demoitem');
(function(){
el.fade('out').get('tween');
el.destroy();
}).delay(5000);
delay () is a function that can be bound to functions, not to the HTMLElement chain.
source
share