1
0
Fork 0
forked from 0x2620/oxjs

some redesign for better garbage collection of elements

This commit is contained in:
j 2011-11-04 22:14:30 +00:00
commit 1d09d19423
17 changed files with 129 additions and 101 deletions

View file

@ -541,7 +541,7 @@ Ox.Dialog = function(options, self) {
self.$content.animate({
opacity: 0
}, 250, function() {
$(this).remove() // fixme: removeElement?
$(this).remove();
});
self.options.content.css({
opacity: 0
@ -649,7 +649,7 @@ Ox.Dialog = function(options, self) {
that.animate({
opacity: 0
}, 250, function() {
// that.removeElement();
// that.remove();
that.hide();
callback && callback();
});

View file

@ -24,7 +24,7 @@ Ox.Layer = function(options, self) {
});
function click() {
that.triggerEvent('click').removeElement();
that.triggerEvent('click').remove();
}
function mousedown() {
@ -39,7 +39,7 @@ Ox.Layer = function(options, self) {
if (self.options.type == 'dialog') {
Ox.UI.$window.unbind({mouseup: mouseup});
}
that.removeElement();
that.remove();
};
that.show = function() {