$(“#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 CSS 基本範例
// 設定一個CSS Style用法
$(“.test > div”).css(“display”,”block”);
// 設定一組CSS Style用法
$(“.v_b_img > div”).css({
‘opacity’: 0,
‘top’: ‘100%’,
});[……]
jQuery 自訂動畫 Animate 基本範例
$(‘.v_b_img’).mouseover(function(e){
$(this).children(‘div’).stop().animate({
‘opacity’: 1,
‘top’: 0
},{
duration:400,
easing:’easeOutQuint’,
complete : function(){}
});
});
jQuery Animate Easing 速查表
http://easings.net/zh-tw[……]
jQuery animate easing 速查表
[……]
CSS 關閉Chrome focus 邊框 reset chrome input focus border
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%[……]