Hi!

I am making a effect that when you click a image the large image is
opened in a absolute positioned div above everything else.
Then a close link is created at the top of the page an clicking that
will close the image again.
The problem I am having is that people can click another image while
the show animation is running and therefore display two divs and
destroying the effect.

If I have something like this:
$(".openAnimation").click(function () {
   alert("clicked the link");
   $("body").append("<a href='#' id='closeThis'>[close]</a>");
   $("#closeThis").click(clickedClose);
   return false;
});

Can I remove the click hook or just set it to this:
$(".openAnimation").click(function () {
   alert("nothing will happen");
   return false;
});

Because if I do it now and click a link I will get both alerts.


So my question is that is it possible to remove all hooked functions
for $(".openAnimation") with a command?

Reply via email to