Created
December 12, 2011 14:15
-
-
Save Zmetser/1467375 to your computer and use it in GitHub Desktop.
Do blink animation with ext.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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