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'
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
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
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
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];
5 matches
Mail list logo