jQuery プラグインhoverIntentを使用して、フォームを含む div を展開/短縮しています。以下に示すように、div が高い場合にフォームが表示されます。
フォーム フィールドのいずれかにフォーカスがある場合、onMouseOut/makeShort が起動しないようにするにはどうすればよいですか?
$(document).ready(function(){
var config = {
over: makeTall, // function = onMouseOver callback (REQUIRED)
timeout: 650, // number = milliseconds delay before onMouseOut
out: makeShort // function = onMouseOut callback (REQUIRED)
};
$("#mydiv").hoverIntent( config );
function makeTall(){
$(this).css({"height":100});
$("#myForm").show('fast');
}
function makeShort(){
$("#myForm").hide('fast');
$(this).css({"height":50});
}
});
ホバー イベント用の別のより堅牢なプラグインがあれば、提案も受け付けています。