小提琴是在這裏:http://jsfiddle.net/44zAy/11/jQuery的焦點/模糊與同一類中的每個輸入 - 有問題
一切工作但是我想,如果您單擊第一個輸入內,然後去點擊第二個裏面,如果您點擊x按鈕,第一個關閉並且相同。
我需要的是它保持打開狀態,即使我在另一個內部點擊並且只有在模糊不清的情況下才會關閉,而不是專注於另一個輸入。那可能嗎?
感謝
CODE:
var inputWdith = '185px';
var inputWdithReturn = '68px';
jQuery('.resize-close').hide();
jQuery(".resize-input").on('focus', function() {
jQuery(this).animate({
width: inputWdith
},400);
jQuery(this).promise().done(function(){
jQuery(this).next('.resize-close').show();
});
}).bind('blur', function() {
jQuery(this).animate({
width: inputWdithReturn
},500);
jQuery(this).next('.resize-close').hide();
});
jQuery('.resize-close').click(function(){
jQuery(this).prev('.resize-input').animate({
width: inputWdithReturn
},500);;
});
爲什麼不這樣做:_ALL_INPUTS.not(SELECT_CLASSES)。在( 「焦點」,函數(){收縮($(本));} ); – Fallenreaper
哪裏縮水調整大小關閉或隱藏()函數調用 – Fallenreaper
我不明白你的迴應球員,對不起.... :( –