Is it possible to use jQuery widgets in an AJS Jira Gadget

I am working on a gadget that displays information in a table using table elements and I wanted to add functionality for reordering columns by click and dragging.

This is my first real attempt at working with JavaScript and I do not have any real idea how to implement this. After researching a little I found a jQuery widget that contains the necessary components for making this happen. However, as I know regular jQuery will not work from within an AJS.Gadget() call, I was wondering if it’s possible to even use that code.

I know that most native jQuery calls can be done through AJS.$ but I am unsure how it can be extended.

If what I want to do is impossible, are there any other solutions for accomplishing this?

Thank you,
Neil Sonnenberg