This repository has been archived on 2020-09-11. You can view files and clone it, but cannot push or open issues or pull requests.
sp4ke.github.com/js/directives.js
2013-03-03 00:21:59 +01:00

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);