Help with onblur
<p>I have a dropdown panel that I have just implemented and need to keep the focus in a textbox after I open the panel. The textbox is not inside the panel but rather below or off the panel on the web page.</p>

<p>Is this possible and if so, how can it be done? I'm using JQuery.</p>

<p><strong>EDIT:</strong>
To keep the focus in the textbox below this panel, where would I add <code>$('#test').focus()</code> in this code?</p>

<hr>

<pre><code>var jkpanel={
  controltext: '',
  $mainpanel: null, contentdivheight: 0,

  openclose:function($, speed){
    this.$mainpanel.stop() //stop any animation
    if (this.$mainpanel.attr('openstate')=='closed')
      this.$mainpanel.animate({top: 0}, speed).attr({openstate: 'open'})
    else
      this.$mainpanel.animate({top: -this.contentdivheight+'px'}, speed).attr({openstate: 'closed'})
  },

  init:function(file, height, speed){
    jQuery(document).ready(function($){
      jkpanel.$mainpanel=$('&lt;div id="dropdownpanel"&gt;&lt;div class="contentdiv"&gt;&lt;/div&gt;&lt;div class="control"&gt;'+jkpanel.controltext+'&lt;/div&gt;&lt;/div&gt;').prependTo('body')
      var $contentdiv=jkpanel.$mainpanel.find('.contentdiv')
      var $controldiv=jkpanel.$mainpanel.find('.control').css({cursor: 'wait'})
      $contentdiv.load(file, '', function($){
        var heightattr=isNaN(parseInt(height)) ? 'auto' : parseInt(height)+'px'
        $contentdiv.css({height: heightattr})
        jkpanel.contentdivheight=parseInt($contentdiv.get(0).offsetHeight)
        jkpanel.$mainpanel.css({top:-jkpanel.contentdivheight+'px', visibility:'visible'}).attr('openstate', 'closed')
        $controldiv.css({cursor:'hand', cursor:'pointer'})
      })
      jkpanel.$mainpanel.click(function(){jkpanel.openclose($, speed)})
    })
  }
}

//Initialize script: jkpanel.init('path_to_content_file', 'height of content DIV in px', animation_duration)
jkpanel.init('panelcontent.htm', '200px', 500);
</code></pre>
