Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0-rc.3/handlebars.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/ember.js/1.0.0-rc.1/ember.js"></script>
<script src="//f.cl.ly/items/1L1F352T3m2Y1m2F2M2s/ember-data.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
<script type="text/x-handlebars">
  {{#view App.HoverView delegateBinding='this' action='showBoldAction'}}
  {{#if showBold}}
  <b>Ember</b>
  {{else}}
   Ember
   {{/if}}
   {{/view}}
</script>
  
</body>
</html>
 
App = Em.Application.create();
App.ApplicationController = Em.Controller.extend({
  name: "This is my name",
  showBold: false,
  showBoldAction: function(){
    this.toggleProperty('showBold');
  }
});
App.HoverView = Em.View.extend({
  tagName: 'span',
  mouseEnter: function(){
    this.get('delegate').send(this.get('action'));
  },
  mouseLeave: function(){
    this.get('delegate').send(this.get('action'));
  }
});
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
ryanjmpro
0viewers