here is the code:
http://jsfiddle.net/j5LtR/6/
this code is a confirm popin message,
on click on "click here" link, it create a new confirm popin message
it works well until 2 Object of this popin are created.
trouble:
the close button on header bar dont act as it should:
it close last opened confirm popin instead of "this" opened confirm popin
to test it in the jsfiddle click 2 times on "click here !!" link, this will create 2 popin (you can move them case they will be superposed)
the bug seem to be there:
//close btn
$('<a>',{
class : 'close',
text : 'X',
title : 'close',
click : function()
{
/*=============close btn !!!!=================*/
alert('CLOSE !');
_that.close();
}
but i do almost samething in the inherit class, and it works ....
nBtn=$('<a>',{
class : 'btn-n',
text : 'no',
title : 'no button',
click : function()
{
/*=============close btn !!!!=================*/
alert('NO !');
_that.close();
}
});
if someone have an idea why the top close button act like that, it could help me, thanks !