disable

caph.focus.focusController. disable

Disables the given item. The 'disabled' class is added. If the given item is equal to the current focus item, it will be blurred automatically.

(static) disable(itemopt) → {caph.focus.focusController}

Parameters:
Name Type Attributes Description
item DOMElement | string <optional>

A DOM element to be disabled. If the string value is passed, it represents the name of the focusable. If not passed anything else, disables the current focus item.

Returns:
Type
caph.focus.focusController
Example
angular.module('myApp', ['caph.focus']).controller('myController', ['$scope', 'focusController', function($scope, focusController) {
 	$scope.disable = function(name) {
 		focusController.disable(name);
 	}
 }]);