fetching the IDs of windows
I am Using jquery windows engine plugin. Im creating windows as following:
for(i=1;i<=3;i++)
{
mywidth=i-1;
mywidth = mywidth*newWidth;
$.newWindow({
id:"iframewindow"+i,
posx:11+mywidth,
posy:38,
width:newWidth,
height:maxHeight,
title:"Window:"+i,
type:"iframe开发者_开发问答",
onWindowClose:function(){
alert(id)
}
minimizeButton: true,
maximizeButton: true,
closeButton: true,
draggable: true,
resizeable: true
});
}
How can I fetch the id of a particular window in the onclose event.
Try
onWindowClose:function(){
var id = $(this).attr('id');
alert(id);
}
I don't know this plugin, but a wild guess is $(this).id
inside the onWindowClose handler.
精彩评论