mirror of
https://github.com/flarum/framework.git
synced 2025-01-25 11:30:46 +08:00
15 lines
378 B
JavaScript
15 lines
378 B
JavaScript
|
import Ember from 'ember';
|
||
|
|
||
|
export default Ember.Mixin.create({
|
||
|
fadeIn: Ember.on('didInsertElement', function() {
|
||
|
var $this = this.$();
|
||
|
var targetOpacity = $this.css('opacity');
|
||
|
$this.css('opacity', 0);
|
||
|
setTimeout(function() {
|
||
|
$this.animate({opacity: targetOpacity}, 'fast', function() {
|
||
|
$this.css('opacity', '');
|
||
|
});
|
||
|
}, 100);
|
||
|
})
|
||
|
});
|