Your customizable personal web portal

 

Hover mouse over a link, click to edit.

Drag a link to a category or a pinboard name to move the link.

< >
function ShowPopup(id) { //to center
//Get the screen height and width
var maskHeight = $(document).height();
var maskWidth = $(window).width();
var scrollTop = $(window).scrollTop();
//Set height and width to mask to fill up the whole screen
$('#mask').css({ 'width': maskWidth, 'height': maskHeight });

//transition effect
$('#mask').fadeIn(0);
$('#mask').fadeTo("slow", 0.3);

//Get the window height and width
var winH = $(window).height();
var winW = $(window).width();

//Set the popup window to center
var p = $(id).css("padding");
var nP = p.substr(0, p.indexOf("px"));
var docH = $(id).height() nP * 2;
var docW = $(id).width() nP * 2;
$(id).css('top', scrollTop (winH / 2 - docH / 2));
$(id).css('left', winW / 2 - docW / 2);

//transition effect
$(id).fadeIn(0);

return id;
}
by Christine on 2012-07-05
Comments(0)
Please login or signup to add comments
1000 chars left
PinABC © 2020
Terms | Privacy | FAQ | Help | Feedback