Refactored the directive to use PureJS instead of having a dependency on jQuery.