javascript - Focus on child div un-focus the parent, how to keep parent focused? -


title says everything... here code: problem generated when focus on toolbar2. keep focused parent div while child has focus on, possible?

$(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();     }); }); 

and here html:

<div id="area_testo" style="display:block;  margin-top:40px;">     <div id="contenitore_toolbar2">         <div id="toolbar2">/*hidden div stuff inside*/</div>     </div>     <div id="textbox" contenteditable="true">         <p>lorem ipsum</p>     </div> </div> 

thank in advance.


Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -