[jQuery] Re: BlockUI inside click()

2007-06-15 Thread Mike Alsup
Yeah, that makes sense. BlockUI doesn't clone the element, but it does move it to another part of the DOM and then removes it from the DOM when unblockUI is called. So the 2nd time through you were binding your yes/no events while those elements were not part of the DOM (which means jQuery can'

[jQuery] Re: BlockUI inside click()

2007-06-15 Thread Fabien Meghazi
Rectification : With unbind in the yes click handler, the Yes button doesn't work anymore the second time the code is triggered. First time it is working ok. Mike, I found the solution but I don't understand it : If I move the $.blockUI() call to the beginning of the $(".a_delete").click hand

[jQuery] Re: BlockUI inside click()

2007-06-15 Thread Fabien Meghazi
If I do this, the effect is that the Yes button's click is not binded anymore. Clicking on it doesn't do anything. I tried to add it at the end of the block but it's the same effect Rectification : With unbind in the yes click handler, the Yes button doesn't work anymore the second time the co

[jQuery] Re: BlockUI inside click()

2007-06-15 Thread Fabien Meghazi
Try adding this to your "yes" click handler code: $(this).unbind('click'); Like this ? $("#modal_yes").click(function() { $(this).unbind('click'); console.log(id);// second console log $.unblockUI(); }); If I do this, the effect is that the Yes button's click

[jQuery] Re: BlockUI inside click()

2007-06-15 Thread Mike Alsup
Fabien, Try adding this to your "yes" click handler code: $(this).unbind('click'); Mike On 6/15/07, Fabien Meghazi <[EMAIL PROTECTED]> wrote: Hi all, I'm puzzled with the following code (context explained below) : $(document).ready(function() { var modal = $("#modal_yesno")[0];