Hi,

I'm doing an internship in a company where they bought a script for
modals called 'Lightview' ( http://www.nickstakenburg.com/projects/lightview/
), so I'm kinda stuck with using it. The problem is that instead of
many other libraries, you cannot pass lightview any callbackfunctions
as parameters. That means the only way to react on, lets say, when
lightview is done opening or closing is to observe global events that
will be fired in such cases.

So if I want to do something when lightview closes I need to observe
'lightview:hidden', but I do not -always- react on this event with a
given behaviour since there are many cases for which lightview is
shown. I just want to react to the close even just this one time.

So I thought, maybe I could write an observer, that "kills" its self
after it has been executed. I tried this:

var discardAll = function(event) {
  // Do stuff
  document.stopObserving('lightview:hidden', discardAll);
}

document.observe('lightview:hidden', discardAll);

But this doesn't work. I must say I don't really have much clue of
stoping specific observers in the first place, so I'm wondering if
this is even the right way to stop an observer

Thanks,
Lukas

-- 
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 prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to