Team:Linkoping Sweden/popup

From 2014.igem.org

(Difference between revisions)
Line 54: Line 54:
             var winH = $(window).height();
             var winH = $(window).height();
             var winW = $(window).width();
             var winW = $(window).width();
 +
            if($(id).height() > winH) {
 +
                $(id).css('height', winH);
 +
            }
 +
            if($(id).width() > winW) {
 +
                $(id).css('width', winW);
 +
            }
             //Set the popup window to center
             //Set the popup window to center
             $(id).css('top', winH/2-$(id).height()/2);
             $(id).css('top', winH/2-$(id).height()/2);

Revision as of 09:15, 16 October 2014