Thanks for advances.
Walter your I think that your solution is the best but what if my
toggled element contains another elements ie.
<div id="test">
<img src=".... />
<a href="#">[...]
</div>
then when I clicked on img result of:
var elm = $('test');
if(evt.element() == elm)
will be false
On 13 Paź, 15:44, Walter Lee Davis <[EMAIL PROTECTED]> wrote:
> Observe document.click, and filter out events that do not include the
> item in question.
>
> document.observe('click', function(evt){
> var elm = $('yourElement');
> if(evt.element() != elm)
> elm.hide();
>
> }
>
> Walter
>
> On Oct 12, 2008, at 6:02 PM, poncjusz wrote:
>
>
>
> > Hi,
>
> > I'm toggling element (show/hide) by giving specific class name
> > (.visible) but how could I make an effect that when I click everywhere
> > EXCEPT this toggled element, it disappear?
>
> > thanks in advanced
> > Tom
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---