Assistance with jquery .children
<p>Im creating some buttons rollovers and for "graceful degradation" sake, and for the sake of not writing code for EVERY image rollover etc, im <strong>trying</strong> to write better more efficient code. That said, what im wanting to do is that with a few lines of code, that my rollovers become a bit smarter about what they display on the screen.</p>

<p>one of the things im trying to achieve is that on rollover, that the text to appear in the center of the images div(via css absolute pos.) is the same text that is in the <strong>alt</strong> property/element of the image.</p>

<p>This is the reg div with thumbnail image:</p>

<pre><code> &lt;div class="imgW"&gt;&lt;img src="img src here"/&gt;&lt;/div&gt;
</code></pre>

<p>now for the rollover, i add it via jquery :</p>

<pre><code>$('.imgW').prepend('&lt;div class="portSecRollOver"&gt;lopan&lt;/div&gt;');
</code></pre>

<p>So on page render, it <strong>should</strong> be outputted like this:</p>

<pre><code>&lt;div class="imgW"&gt;
  &lt;div class="portSecRollOver"&gt;lopan&lt;/div&gt;
  &lt;img src="img src here"/&gt;
&lt;/div&gt;
</code></pre>

<p>at page load, portSecRollOver is hidden via css.<code>(display:none);</code></p>

<p>on rollover, portSecRollOver is shown via jquery:</p>

<pre><code>$('.imgW').mouseover(function(){

        $(this).children('.portSecRollOver').css("display","block");
    });
</code></pre>

<p>etc...</p>

<p>now on this same rollover function block above, what i wanted to do is that on rollover,
the text to appear inside of portSecRollOver div is the value of that divs image alt tag.</p>

<p>How can i achieve this?</p>

<p>ive tried many approaches and they all end up as nothing. when i do a console.log on it to test it, i always get an "undefined" which leads me to assume im not targeting the correct dom object.</p>

<p>Any ideas? Ive tried many ways but, this is to give you an idea as to what ive tried...something like</p>

<pre><code>$(this).children('.portSecRollOver').html($(this).children('a img').attr('alt'));
</code></pre>

<p>Thanks in advanced.</p>
