first child in jquery
<p>HTML:</p>

<pre><code>        &lt;div class="wrapper" style="display:none"&gt;
          &lt;div class="panel"&gt;&lt;/div&gt;
        &lt;/div&gt;
</code></pre>

<p>JS CALL</p>

<pre><code>var element = $(".wrapper");
element.toggle().children(":first").custom();
$(".wrapper .panel").custom();
</code></pre>

<p>CUSTOM JQUERY METHOD</p>

<pre><code>  $.fn.custom = function() {  
        return this.each(function() {
           console.log(" this = ", this);
               // do something to each dom element.
        });
    };
</code></pre>

<p>Whats odd here is when I do a console.log in IE its showing the first call to the panel element as a </p>

<p><strong>[object HTMLGenericElement]</strong></p>

<p>but the second call shows it as a <strong>[objectHTMLDIVElement]</strong></p>

<p>Why is this and how to have the first call be a [objectHTMLDIVElement]</p>
