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/