Reputation: 11
New to prototype, googled this trouble but didn't find any solution. Works fine in other browsers but alerts an error in ie
Event.observe(document.body, 'click', function(evt) {
var element = evt.target;
if ('sign_in' != element.id && 'customer_link'!= element.id && !element.descendantOf('sign_in') && !element.descendantOf('customer_link'))
{$('sign_in').hide();$('customer_link').removeClassName('poped');}
});
Upvotes: 1
Views: 134
Reputation: 117354
Use
var element = evt.element();
instead of
var element = evt.target;
Upvotes: 1