How to convert a jQuery plugin to AngularJS Directive

What converting a normal jQuery plugin to an AngularJS friendly directive looks like.
Back to Top