簡要概要,此代碼運行得非常漂亮,除了使用webkit上的單選按鈕之外,它的功能還不錯。jQuery,使用.bind編寫if語句與.focus尋找替代方法來執行
$('input, textarea, select').focus(function(){
$(this).parents('.row').addClass("hilite");
}).blur(function(){
$(this).parents('.row2').removeClass("hilite");
});
我做了一些研究和測試了幾次,並使用
$('input, textarea, select').bind('change'(){
$(this).parents('.row').addClass("hilite");
}).blur(function(){
$(this).parents('.row').removeClass("hilite");
});
我能得到它與WebKit的單選按鈕的工作,但它不承認的模糊和爲此不刪除hilite。那麼有沒有其他的方法來寫這個,所以它會刪除模糊vs mouseleave上的類(它可以工作)。一如既往的感謝!
這個伎倆!謝謝! – CarterMan 2010-06-26 20:58:35