开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜