App.IndexView = Ember.View.extend({ bindCopyButton: function() { var self = this; var controller = this.get('controller'); var copyButton = this.$('.copy-button'); var clip = new ZeroClipboard(copyButton); clip.on('dataRequested', function (client, args) { client.setText(document.location.href); controller.set('justCopied', true); setTimeout(function() { controller.set('justCopied', false); Ember.run.next(function(){ self.bindCopyButton(); }); }, 1500); }); }.on('didInsertElement'); });