None of UI functions work when called inside of a JS object?

None of UI functions work when called inside of a JS object?


Hi,
I am using objects in JS and I am trying to add draggable() into a DIV
that works when I move the function out of the object context.
Example:
function obj_xxx() {
this.init = function() {
$(function() { $("#test").draggable();
}
}
testobj = new obj_xxx();
testobj.init();
That does not work. However, if I do this:
testobj = new obj_xxx();
testobj.init();
$(function() { $("#test").draggable();
Then it will work... because the draggable is not within the object.
I need this to work within the object, because I will have several
DIVs associated with objects and I need them to have draggable() in
specific cases.
Help?