diff options
author | matthew <matthew> | 2007-02-02 13:43:32 +0000 |
---|---|---|
committer | matthew <matthew> | 2007-02-02 13:43:32 +0000 |
commit | 89953524b71a1ce142ce18002063aed60543b0e0 (patch) | |
tree | 7e68bb99417f077909679138e4a34e197306d52a /web/js.js | |
parent | 1d78891ed4547f3edad2839c51205f49508e2118 (diff) |
Problems with floated children.
Diffstat (limited to 'web/js.js')
-rw-r--r-- | web/js.js | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -40,19 +40,17 @@ YAHOO.util.Event.onContentReady('mapForm', function() { }); YAHOO.util.Event.onContentReady('email_alert', function() { - this.onclick = function() { - if (this.on) { + YAHOO.util.Event.addListener(this, 'click', function(e) { + YAHOO.util.Event.preventDefault(e); + if (YAHOO.util.Dom.getStyle('email_alert_box', 'display') == 'block') { YAHOO.util.Dom.setStyle('email_alert_box', 'display', 'none'); - this.on = false; } else { var pos = YAHOO.util.Dom.getXY(this); pos[0] -= 20; pos[1] += 20; YAHOO.util.Dom.setStyle('email_alert_box', 'display', 'block'); YAHOO.util.Dom.setXY('email_alert_box', pos); - this.on = true; } - return false; - } + }); }); // I love the global |