make .appendTo() work

This commit is contained in:
rlx 2011-08-23 19:08:08 +00:00
parent e8347aeabc
commit 11d46c4d17
2 changed files with 5 additions and 0 deletions

View file

@ -70,6 +70,7 @@ Ox.Element = function(options, self) {
};
}
// create event handler
// (this can be passed as part of self)
if (!self.$eventHandler) {
self.$eventHandler = $('<div>');
}

View file

@ -21,6 +21,10 @@ Ox.JQueryElement = function($element) {
that.$element = $element.data({
oxid: that.id
});
// FIXME: the following two lines should make it possible to do
// $('<div>').appendTo($element) ... check if it works, then replace all
that[0] = that.$element[0];
that.length = 1;
Ox.UI.elements[that.id] = that;
return that;
};