> $('a.show_reset_pass_box').unbind('click');
This line is unbinding ALL click events. So the second click binding
function is not fired, since it's not bound...
----
Read jQuery HowTo Resource - http://jquery-howto.blogspot.com
On Sat, Feb 7, 2009 at 2:48 PM, rob303 <[email protected]> wrote:
>
> Hi,
>
> This should be easy.
>
> I want to disable a link and then re-enable it later. I have:
>
> $('a.show_reset_pass_box').click(function() {
> // do some stuff
> $('a.show_reset_pass_box').unbind('click');
> return false;
> });
>
> Which works just fine. But then when I try to do:
>
> $('a.close_reset_pass_box').click(function() {
> // do some stuff
> $('a.show_reset_pass_box').bind('click');
> return false;
> });
>
> The click event isn't bound back onto the anchor.
>
> The anchor looks like this:
>
> <a class="show_reset_pass_box" title="Lost Password?">Lost Password?</
> a>
>
> What am I doing wrong?
>
> Many thanks in advance for any hekp.
>
> Rob.