jquery - Toggle Dropdown-button via Javascript / AngularJS - directive -
jquery - Toggle Dropdown-button via Javascript / AngularJS - directive -
i have directive in angular js, generates bootstrap dropdown-button. works fine.
also open , close dropdown pressing key on keyboard. works fine! can close dropdown-menu pressing keyboard-key not mouse. , can't utilize arrows navigate in dropdown-menu - have ideas?
ps: sorry real bad english...
app.directive('xnbtn', ['$http', function($http) { homecoming { restrict: 'e', replace: true, transclude: true, scope: true, link : function (scope, e, a) { $(document).keydown(function(evt){ if (evt.ctrlkey && evt.altkey && evt.keycode == 78) { // n-key $('.dropdown-menu', e).toggle('toggle'); //.focus(); homecoming false; } }); scope._cn3j2_bclist = {}; $http({method: 'post', url: '/system/xn', data: $.param(sure)}). success(function(data) { scope._cn3j2_bclist = data; // fills list array }); }, templateurl: '/assets/directives/tmp/xnbtn.html' } }]);
jquery angularjs twitter-bootstrap drop-down-menu
Comments
Post a Comment