タイトルはすべてを示しています...コードは次のとおりです。toolBar2に焦点を合わせると問題が発生します。子がフォーカスしている間、親 div にフォーカスしたままにしたいのですが、可能ですか?
$(document).ready(function () {
$("#area_testo").focusin(function () {
$(this).css("background-color", "#FFFFCC");
$("#toolBar2").fadeIn(1000);
});
$("#area_testo").focusout(function () {
$(this).css("background-color", "#FFFFFF");
$("#toolBar2").fadeOut();
});
});
ここにhtmlがあります:
<div id="area_testo" style="display:block; margin-top:40px;">
<div id="contenitore_toolBar2">
<div id="toolBar2">/*HIDDEN DIV WITH SOME STUFF INSIDE*/</div>
</div>
<div id="textBox" contenteditable="true">
<p>Lorem ipsum</p>
</div>
</div>
前もって感謝します。