jQuery 按Enter submit送出表單並清除系統音效

$(“#form”).keypress(function(event) { if (event.which == 13){ event.preventDefault(); $(this).submit(); } }); 加event.preventDefault();可清除瀏覽器Enter的預設事件~ 按下Enter送出表單時才不會觸發「噹」的系統音效~[……]

閱讀更多

jQuery MaxImage 2.0 random option not randomizing the first image 第一張圖無法隨機

在MaxImage 2中幻燈片切換的特效是使用jQuery Cycle Plugin,
而在MaxImage 2下載的Demo中引入的是jQuery Cycle Version: 2.9998版本,
第一張圖無法隨機,應該是jQuery Cycle Version: 2.9998版的bug,
更新jQuery Cycle Plugin至最新版本就可以解決^^

Should be a bug
Please download the latest version
jQuery Cycle Plugin
http://jquery.malsup.com/cycle/download.html

[……]

閱讀更多

jQuery Cycle Plugin random option not randomizing the first image 第一張圖無法隨機

應該是bug, dowload最新版本即可解決

Should be a bug
Please download the latest version
jQuery Cycle Plugin
http://jquery.malsup.com/cycle/download.html[……]

閱讀更多

jQuery animate easing 速查表

這是一個非常好用的工具,大部份的時候我們很難用文字來形容jQuery中動畫的Easing效果,下列這個網頁把所有Easing效果整理出來用波型圖片來讓大家一眼就了解動畫的效果,另外如果圖片看起來還不夠清楚,滑鼠滑過圖片上方會出現一個紅色鍵頭,即可看到動畫的動態效果。

[……]

閱讀更多

CSS div height 無法 100% 問題

height的100%即為父層高度的100%,
但div在body之下仍然沒有辦法達到100%,
主要原因是HTML所有物件都會包在body之中,
大部份人都知道都會在CSS開頭初始body,如下:

body{
margin:0;
padding: 0;
width:100%;
height:100%;
}

但html常常都會忽略,body外面還有一層html,html一樣需要被初始,如下 :

html, body{
margin:0;
padding: 0;
width:100%;
height:100%;
}

如此,初始了最外層的html & body為100%,裡面的物件才有可能被CSS設置到完全的100%[……]

閱讀更多