Skip to content

Instantly share code, notes, and snippets.

@Zmetser
Created December 12, 2011 14:15
Show Gist options
  • Save Zmetser/1467375 to your computer and use it in GitHub Desktop.
Save Zmetser/1467375 to your computer and use it in GitHub Desktop.
Do blink animation with ext.js
function blinkingAnimation(evt, el, o) {
var target = Ext.get(o.element || el);
var blink = {
run: function () {
target.fadeOut(100);
target.fadeIn(100);
},
interval: 200,
repeat: o.repeat || 10
};
return Ext.TaskMgr.start(blink);
}
Ext.select("#doBlinkingAnimation").on('click', blinkingAnimation, this, {'element': 'hello', 'repeat': 3});
<p id="hello">Hello World</p>
<a href="javascript:;" id="doblink">Blink!</a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment