Rebind a unbind click
- by Antonio Ortiz
I am using this library that allows you to create a more elegant alert box (you can even use images!);
I used it with a click function and it works! A nice container opens with a close button, GREAT!
I noticed if you happen to click more than once on the link you assigned, it keeps firing. So multiple images begin to propagate. I used the unbind method, but it cancels the link permanently (until refresh etc.).
I was surprised to see the library doesn't compensate for this little problem, so I am wondering if you could rebind the click when you close the image window so it starts from the beginning.
$(".shopFrag").click(function(){
Messi.img("_images/wishlist.jpg");
$(".shopFrag").unbind('click');
});