1
0
Fork 0
forked from 0x2620/oxjs

make layer opaque on click

This commit is contained in:
Rolux 2010-02-21 12:39:32 +05:30
commit 444fabdb39
3 changed files with 22 additions and 5 deletions

View file

@ -1299,8 +1299,10 @@ requires
.appendTo(that.$buttonsbar);
});
that.$buttons[0].focus();
that.$layer = new Ox.Element()
.addClass("OxLayer");
that.$layer = new Ox.Element() // fixme: Layer widget, that would handle click?
.addClass("OxLayer")
.mousedown(mousedownLayer)
.mouseup(mouseupLayer);
function center() {
that.css({
@ -1348,6 +1350,18 @@ requires
}
function mousedownLayer() {
that.$layer.stop().animate({
opacity: 0.5
}, 100);
}
function mouseupLayer() {
that.$layer.stop().animate({
opacity: 0
}, 100);
}
function reset() {
that.width(self.options.width);
that.height(self.options.height);
@ -1432,7 +1446,7 @@ requires
reset();
that.css({
opacity: 0
}).appendTo(that.$layer).animate({
}).appendTo($body).animate({
opacity: 1
}, 200);
return that;