Skip to content

Instantly share code, notes, and snippets.

@minsooshin
Created January 8, 2016 16:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save minsooshin/9d9a8132c5cd347951f5 to your computer and use it in GitHub Desktop.
Save minsooshin/9d9a8132c5cd347951f5 to your computer and use it in GitHub Desktop.
'use strict';
import can from 'can';
import template from './nav.stache!';
import ViewModel from './nav.viewmodel';
import './nav.less!';
import './button';
export default can.Component.extend({
init: function(element) {
this.$element = $(element);
},
tag: 'sc-nav',
template: template,
viewModel: ViewModel,
events: {
'{this.$element} mouseleave': function() {
$('sc-nav-button button').removeClass('sa-selected');
$('.sa-nav-content').removeClass('sa-selected');
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment