// Instead of this: link: function (scope, element) { // Do this: link: function (scope, element, attrib) {Now you have access to the attributes, so to grab the value:
var attribValue = attrib.smFocus(take a look at attrib in the debugger and you'll see the values it holds).