I've accomplished rebinding simply by using oneclick(), and then in
the call back setting the full click(). Originally I skipped over
reading about  oneclick, because I thought it was onclick.


On 10/25/06, Franck Marcia <[EMAIL PROTECTED]> wrote:
> 2006/10/26, Brice Burgess <[EMAIL PROTECTED]>:
> > I have a "click" event assigned to a link. When the event fires, I'd
> > like to unbind this event and re-assign a new "click" event to the link.
> > The re-assignment is handled within the originating "click" event.
> >
> > Is the a jQ bug? Is there a better workaround/means? I realize I could
> > probably have 2 links & hide the inactive one.
> >
>
> Hi, Brice
>
> I ran into the same problem.
>
> The workaround I found was something like this:
>
> <script>
> $(function() {
>         $("#link").click(function() {
>                 if ($(this).html() == 'aaaa') {
>                         alert('aaaa');
>                         $(this).html('bbbb');
>                 } else {
>                         alert('bbbb');
>                         $(this).html('aaaa');
>                 }
>                 return false;
>         });
> });
>
> </script>
>
> <a href="#" id="link">aaaa</a>
>
> Not really optimized, but you've got it.
>
> Cheers,
>
> Franck.
>
> _______________________________________________
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>


-- 
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to