wboykinm

Fullscreen Variables

Sep 7th, 2011
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script type="text/javascript" charset="utf-8">
  2. $(document).ready(function() {
  3.         var orig_width = $("#map").width();
  4.         var orig_height = $("#map").height();
  5.        
  6.         currZoom = map.getZoom();
  7.         currCenter = map.getCenter();
  8.        
  9.         $(".fullscreenmap_click").colorbox({
  10.                 width:"100%",
  11.                 height:"100%",
  12.                 inline:true,
  13.                 href:"#map",
  14.                 // Resize Map DIV and Refresh
  15.                 onComplete:function(){
  16.                     $("#map").width("99%");
  17.                         $("#map").height("99%");
  18. //                      $("#map").append();
  19. //                      $(".fullscreenmap_cats").draggable( { handle: 'h2' } );
  20.                         map.setCenter(currCenter, currZoom, false, false);
  21.                 },
  22.                 // Return DIV to original state
  23.                 onClosed:function(){
  24.                         $("#map").width(orig_width);
  25.                         $("#map").height(orig_height);
  26.                         $("#map").show();
  27.                         map.setCenter(currCenter, currZoom, false, false);
  28.                 }
  29.         });
  30. });
Advertisement
Add Comment
Please, Sign In to add comment