diff --git a/lib/angular-help-overlay.js b/lib/angular-help-overlay.js index b5146e6..7983555 100644 --- a/lib/angular-help-overlay.js +++ b/lib/angular-help-overlay.js @@ -42,9 +42,9 @@ angular.module('angularHelpOverlay', []).directive('helpOverlay', ['$document', if (noop === true) { noop = false; } else if (newValue === true) { - element.chardinJs('start'); + $(element).chardinJs('start'); } else if (newValue === false) { - element.chardinJs('stop'); + $(element).chardinJs('stop'); } } }); diff --git a/lib/angular-help-overlay.min.js b/lib/angular-help-overlay.min.js index 1c03df1..e6a69a4 100644 --- a/lib/angular-help-overlay.min.js +++ b/lib/angular-help-overlay.min.js @@ -1,2 +1,2 @@ -/*! angular-help-overlay 2015-07-18 */ -angular.module("angularHelpOverlay",[]).directive("helpOverlay",["$document",function(a){var b=!1;return{restrict:"A",scope:{helpOverlay:"=",overlayStart:"&overlayStartCallback",overlayStop:"&overlayStopCallback"},link:function(c,d){a.on("chardinJs:start",function(a){angular.isFunction(c.overlayStart)&&c.overlayStart(a),c.helpOverlay===!1&&c.$apply(function(){b=!0,c.helpOverlay=!0})}),a.on("chardinJs:stop",function(a){angular.isFunction(c.overlayStop)&&c.overlayStop(a),c.helpOverlay===!0&&c.$apply(function(){b=!0,c.helpOverlay=!1})}),c.$watch("helpOverlay",function(a,c){a!==c&&(b===!0?b=!1:a===!0?d.chardinJs("start"):a===!1&&d.chardinJs("stop"))})}}}]); \ No newline at end of file +/*! angular-help-overlay 2015-08-12 */ +angular.module("angularHelpOverlay",[]).directive("helpOverlay",["$document",function(a){var b=!1;return{restrict:"A",scope:{helpOverlay:"=",overlayStart:"&overlayStartCallback",overlayStop:"&overlayStopCallback"},link:function(c,d,e){a.on("chardinJs:start",function(a){angular.isFunction(c.overlayStart)&&c.overlayStart(a),c.helpOverlay===!1&&c.$apply(function(){b=!0,c.helpOverlay=!0})}),a.on("chardinJs:stop",function(a){angular.isFunction(c.overlayStop)&&c.overlayStop(a),c.helpOverlay===!0&&c.$apply(function(){b=!0,c.helpOverlay=!1})}),c.$watch("helpOverlay",function(a,c){a!==c&&(b===!0?b=!1:a===!0?$(d).chardinJs("start"):a===!1&&$(d).chardinJs("stop"))})}}}]); \ No newline at end of file diff --git a/src/angular-help-overlay.js b/src/angular-help-overlay.js index b5146e6..7983555 100644 --- a/src/angular-help-overlay.js +++ b/src/angular-help-overlay.js @@ -42,9 +42,9 @@ angular.module('angularHelpOverlay', []).directive('helpOverlay', ['$document', if (noop === true) { noop = false; } else if (newValue === true) { - element.chardinJs('start'); + $(element).chardinJs('start'); } else if (newValue === false) { - element.chardinJs('stop'); + $(element).chardinJs('stop'); } } });