I’ve spent this morning brushing up on JQuery, as I start a new role tomorrow, and in that role they might be using JQuery heavily. Let’s wait and see!

I’m using the following page on W3 Schools JQuery Examples to brush up.

But while I was brushing up I remembered that all this learning would not go to waste in the future, learning never does! as of course Angular has it’s own version of JQuery! jqLite, that allows Angular to manipulate the DOM in a ‘cross compatible way’ and I remembered that this can be accessed through the link function in an Angular Directive. ie.

function link(scope, element, attrs) { ... }

the element parameter here is a jqLite-wrapped element, that can be used to manipulate the element that the directive matches.

Check out:

Creating a Directive that Manipulates the DOM

Angular element - jqLite reference

Wish me luck for tomorrow :)