Simple starting point for Ember.js fiddles

by pangratz666

HTML

<script src="https://github.com/downloads/emberjs/ember.js/ember-0.9.5.js"></script>
<script type="text/x-handlebars" data-template-name="tmpl" >
    <button {{action "hide" }}>hide</button>
    
    This is my test view which is faded in and out
</script>

JavaScript

App = Ember.Application.create({});

Ember.View.create({
    templateName: 'tmpl',

    didInsertElement: function() {
        this.$().hide().show("slow");
    },

    hide: function() {
        var that = this;
        this.$().hide("slow", function() {
            that.remove();
        });
    }
}).append();