Changeset 60 for oceandb


Ignore:
Timestamp:
Feb 18, 2009, 1:20:27 PM (16 years ago)
Author:
jazz
Message:
  • 新增視窗大小改變事件處理函式
Location:
oceandb/jQuery_Prototype
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • oceandb/jQuery_Prototype/index.css

    r57 r60  
    1919#copyright    { float: left;  margin-left:  5px; height: 100%; vertical-align: middle; }
    2020#logos        { float: right; margin-right: 5px; }
    21 #logos img    { border: none; height: 23px; }
     21#logos img    { border: none; height: 28px; }
  • oceandb/jQuery_Prototype/index.html

    r59 r60  
    99    <link rel="stylesheet" type="text/css" href="index.css" />
    1010    <link rel="stylesheet" type="text/css" href="css/theme/ui.all.css" />
    11     <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAREq2HXjZzIdAyVORbKBYMhTfzQKfMm5eNRoty1ZKt0XEeQdtXxTxlSH6lZOV7UEfIym3ft5_EnXXDw" type="text/javascript"></script>
     11    <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAREq2HXjZzIdAyVORbKBYMhS0opoRyiGs9EYG_2S3darp9jU7AxQMTZii5Zwk4YWMLsJgow_aq10QxA" type="text/javascript"></script>
    1212    <script src="script/jquery.js"  language="javascript"></script>
    1313    <script src="script/jquery-ui.js"  language="javascript"></script>
  • 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.