28 lines
741 B
JavaScript
28 lines
741 B
JavaScript
|
// Generated by CoffeeScript 1.4.0
|
||
|
(function() {
|
||
|
|
||
|
angular.module('myApp.directives', []).directive('appVersion', [
|
||
|
'version', function(version) {
|
||
|
return function(scope, elm, attrs) {
|
||
|
return elm.text(version);
|
||
|
};
|
||
|
}
|
||
|
]).directive('hoverShow', function() {
|
||
|
return {
|
||
|
link: function(scope, elm, attrs) {
|
||
|
elm.bind('mouseover', {
|
||
|
attrs: attrs
|
||
|
}, function(ev) {
|
||
|
return elm.closest('.projects').find('.' + ev.data.attrs.hoverShow).show();
|
||
|
});
|
||
|
return elm.bind('mouseout', {
|
||
|
attrs: attrs
|
||
|
}, function(ev) {
|
||
|
return elm.closest('.projects').find('.' + ev.data.attrs.hoverShow).hide();
|
||
|
});
|
||
|
}
|
||
|
};
|
||
|
});
|
||
|
|
||
|
}).call(this);
|