Hi, I'm trying to convert some jquery code to Prototype. Basically I want a click anywhere in the document other than the menu to close any open menu windows.
in jQuery, it's this: $(document).click(function(event){ var target = $(event.target); if (target.parents("#menu").length == 0) { hide('all'); } }); in Prototype, I have this: Element.observe(document, 'click', doThis); function doThis(event){ var target = $(event.target); alert(target); } But how do I access the id and/or parent of the target element, so I can determine whether or not to close the menu windows? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---