Ignore:
Timestamp:
Feb 18, 2009, 1:20:27 PM (15 years ago)
Author:
jazz
Message:
  • 新增視窗大小改變事件處理函式
File:
1 edited

Legend:

Unmodified
Added
Removed
  • oceandb/jQuery_Prototype/script/oceandb.js

    r59 r60  
     1// 註冊 onReady Event
     2// 參考: http://docs.jquery.com/Events
    13$(document).ready(function() {
     4
     5  // 顯示 Loading 字樣
     6
     7  // 設定地圖高度
     8  var map_height=document.documentElement.clientHeight - 68;
     9  $('#main').css( { height: map_height } );
     10
     11  // 設定左側選單的 Accordion 風格
     12  $('#map-menu').accordion({ header: "h3" });
     13
     14  // 設定點選 "MENU" 的行為
    215  $('#btnMenu').click(function()
    316  {
     
    1124    }
    1225  });
     26});
    1327
    14   $('#map-menu').accordion({ header: "h3" });
     28// 註冊 window 物件的 onResize Event
     29// 參考: http://docs.jquery.com/Events
     30$(window).resize(function() {
     31  // 當改變瀏覽器大小時,重新設定地圖高度
     32  var map_height=document.documentElement.clientHeight - 68;
     33  $('#main').css( { height: map_height } );
    1534});
    1635
Note: See TracChangeset for help on using the changeset viewer.