title: How to run a function after div has lost focus?
body: <p>I have several <code>divs</code> that each contain a <code>form</code>. Each of the forms has two <code>input text</code> <code>fields</code>.
  I am trying to <code>trigger</code> a <code>function</code> after <code>div looses focus</code> (meaning, not after one of the input text fields looses focus, but after totally new form in new div gains focus).</p>
  
  <pre><code>&lt;div class='userInput' id='userInputID'&gt;
     &lt;div class='col1'&gt;
      &lt;form id='form1' method='post' action='BuyOrder.php'&gt;
        &lt;input type='text' name='r1' id='r1' value=''&gt;&lt;br /&gt;
        &lt;input type='text' name='b1' id='b1' value=''&gt;&lt;br /&gt;
        &lt;button id='button1' class='sendButton'&gt;send&lt;/button&gt;
      &lt;/form&gt;
     &lt;/div&gt;          
     &lt;div class='colX'&gt;
       &lt;form id='formX' method='post' action='BuyOrder.php'&gt;
        &lt;input type='text' name='rX' id='rX' value=''&gt;&lt;br /&gt;
        &lt;input type='text' name='bX' id='bX' value=''&gt;&lt;br /&gt;
        &lt;button id='buttonX' class='sendButton'&gt;send&lt;/button&gt;
       &lt;/form&gt;
     &lt;/div&gt;    
     &lt;div class='col2'&gt;
       &lt;form id='form2' method='post' action='BuyOrder.php'&gt;
         &lt;input type='text' name='r2' id='r2' value=''&gt;&lt;br /&gt;
         &lt;input type='text' name='b2' id='b2' value=''&gt;&lt;br /&gt;
         &lt;button id='button2' class='sendButton'&gt;send&lt;/button&gt;
       &lt;/form&gt;
     &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>And here is jquery code:</p>
  
  <pre><code>$('#userInputID').children().blur(function(){        
  //some code   
  
  })//end blur
  </code></pre>
  
  <p>Basically, I want the function to run when any of the divs with the class col1, colx or col2 looses focus. 
  The jquery code above never even fires. Focusout doesn't work because that fires after each input text fields loose focus, even if the same div still has focus.</p>