Posted By

bavithra on 09/08/11


Tagged


Versions (?)

Center the popup


 / Published in: PHP
 

  1. var centerDiv = $("#"+container_id);
  2.  
  3. centerDiv.css("position","absolute");
  4.  
  5. centerDiv.css("top", ( $(window).height() - centerDiv.height() ) / 2+$(window).scrollTop() + "px");
  6.  
  7. centerDiv.css("left", ( $(window).width() - centerDiv.width() ) / 2+$(window).scrollLeft() + "px");

Report this snippet  

You need to login to post a comment.