Jineeshjohn’s Blog

Parent window overlay.

Posted on: November 11, 2009

Here I would like to show a how to create a overlay for the parent window using jQuery.

 Parent window code 

// your jquery js path


/* A unique name for the window. 
    Used when ever dealing with multiple pop - up windows */
var wn = new Date().valueOf(); 
function disableParent(){
	var e = $("div.overlay");
	var p = $("body");
	e.height(p.height()).width(p.width()).show();
	
}
function enableParent(){
 	var e = $("div.overlay",opener.document).css("display","none");
	window.close();
}



	div.overlay{
		background-color:#666;
		position:absolute;
		display:none;
		z-index:10;
		height:800px;
		width:1000px;
		filter: alpha(opacity=50);
		opacity: 0.5;
	}



Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


  • None
  • No comments yet

Categories

%d bloggers like this: