From 3090b587fd3f8377def7c80618ad55c6fb228b3c Mon Sep 17 00:00:00 2001 From: MaysWind Date: Wed, 29 Jun 2016 22:08:52 +0800 Subject: [PATCH] refactor code --- src/scripts/directives/tooltip.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scripts/directives/tooltip.js b/src/scripts/directives/tooltip.js index 32908da..fc0a2f2 100644 --- a/src/scripts/directives/tooltip.js +++ b/src/scripts/directives/tooltip.js @@ -16,7 +16,7 @@ angular.extend(options, attrs); - $(element).tooltip({ + angular.element(element).tooltip({ title: scope.title, placement: options.ngTooltipPlacement, container: options.ngTooltipContainer, @@ -24,7 +24,7 @@ }); scope.$watch('title', function () { - $(element).attr('title', scope.title).tooltip('fixTitle'); + angular.element(element).attr('title', scope.title).tooltip('fixTitle'); }); } };