/* This file is part of Syj, Copyright (c) 2010-2011 Arnaud Renevier,
and is published under the AGPL license. */
+"use strict";
+
var CloseBtn = Class.create({
initialize: function(elt, options) {
var btn, imgsrc, style;
if (supportsTransition && hasOpacityTransition(div)) {
div.observe(endTransitionEventName, function() {
div.stopObserving(endTransitionEventName);
- div.hide();
+ if (!div.getOpacity()) { // in case show has been called in-between
+ div.hide();
+ }
});
div.setOpacity(0);
} else {
}
function clearMessages(div) {
- if (div.visible()) {
+ if (div.getOpacity()) {
hide(div);
}
return div;
}
div.appendChild(node);
- if (!div.visible()) {
+ if (div.getOpacity()) {
show(div);
}
return div;